mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 07:08:08 +02:00
avoid toString conversion in lookup
This commit is contained in:
parent
5517602df0
commit
6dc697071e
1 changed files with 2 additions and 2 deletions
4
fonts.js
4
fonts.js
|
@ -58,8 +58,8 @@ var Fonts = {
|
|||
for (var i = 0; i < chars.length; ++i) {
|
||||
var ch = chars.charCodeAt(i);
|
||||
var uc = encoding[ch];
|
||||
if (typeof uc != "number") // we didn't convert the glyph yet
|
||||
uc = encoding[ch] = GlyphsUnicode[uc];
|
||||
if (uc instanceof Name) // we didn't convert the glyph yet
|
||||
uc = encoding[ch] = GlyphsUnicode[uc.name];
|
||||
ret += String.fromCharCode(uc);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue