2nd attempt to make glyph list integers
This commit is contained in:
parent
4184414501
commit
fd269facbc
8
fonts.js
8
fonts.js
@ -40,7 +40,7 @@ var Fonts = {
|
|||||||
|
|
||||||
unicodeFromCode: function fonts_unicodeFromCode(aCode) {
|
unicodeFromCode: function fonts_unicodeFromCode(aCode) {
|
||||||
var unicode = GlyphsUnicode[this.active.encoding[aCode]];
|
var unicode = GlyphsUnicode[this.active.encoding[aCode]];
|
||||||
return unicode ? "0x" + unicode : aCode;
|
return unicode ? unicode : aCode;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -175,7 +175,7 @@ Font.prototype = {
|
|||||||
// see what's happening
|
// see what's happening
|
||||||
if (debug) {
|
if (debug) {
|
||||||
for (var i = 0; i < charset.length; i++) {
|
for (var i = 0; i < charset.length; i++) {
|
||||||
var unicode = new Number("0x" + GlyphsUnicode[charset[i]]);
|
var unicode = GlyphsUnicode[charset[i]];
|
||||||
if (!unicode)
|
if (!unicode)
|
||||||
error("Unicode for " + charset[i] + " is has not been found in the glyphs list");
|
error("Unicode for " + charset[i] + " is has not been found in the glyphs list");
|
||||||
testString += String.fromCharCode(unicode);
|
testString += String.fromCharCode(unicode);
|
||||||
@ -1183,10 +1183,6 @@ CFF.prototype = {
|
|||||||
if (glyph != ".notdef")
|
if (glyph != ".notdef")
|
||||||
warn(glyph + " does not have an entry in the glyphs unicode dictionary");
|
warn(glyph + " does not have an entry in the glyphs unicode dictionary");
|
||||||
} else {
|
} else {
|
||||||
var b1 = parseInt("0x" + unicode[0] + unicode[1]);
|
|
||||||
var b2 = parseInt("0x" + unicode[2] + unicode[3]);
|
|
||||||
unicode = FontsUtils.bytesToInteger([b1, b2]);
|
|
||||||
|
|
||||||
charstrings.push({
|
charstrings.push({
|
||||||
glyph: glyph,
|
glyph: glyph,
|
||||||
unicode: unicode,
|
unicode: unicode,
|
||||||
|
8406
glyphlist.js
8406
glyphlist.js
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user