avoid toString conversion in lookup
This commit is contained in:
parent
d2e18d35b5
commit
494227dfcc
4
fonts.js
4
fonts.js
@ -58,8 +58,8 @@ var Fonts = {
|
|||||||
for (var i = 0; i < chars.length; ++i) {
|
for (var i = 0; i < chars.length; ++i) {
|
||||||
var ch = chars.charCodeAt(i);
|
var ch = chars.charCodeAt(i);
|
||||||
var uc = encoding[ch];
|
var uc = encoding[ch];
|
||||||
if (typeof uc != "number") // we didn't convert the glyph yet
|
if (uc instanceof Name) // we didn't convert the glyph yet
|
||||||
uc = encoding[ch] = GlyphsUnicode[uc];
|
uc = encoding[ch] = GlyphsUnicode[uc.name];
|
||||||
ret += String.fromCharCode(uc);
|
ret += String.fromCharCode(uc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user