Do not alter the encoding if no file is going to be altered
This commit is contained in:
parent
0c091ca855
commit
5e37bf7aeb
3
pdf.js
3
pdf.js
@ -4304,6 +4304,9 @@ var PartialEvaluator = (function() {
|
|||||||
var index = GlyphsUnicode[glyph] || i;
|
var index = GlyphsUnicode[glyph] || i;
|
||||||
glyphsMap[glyph] = encodingMap[i] = index;
|
glyphsMap[glyph] = encodingMap[i] = index;
|
||||||
|
|
||||||
|
if (!fontFile)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (index <= 0x1f || (index >= 127 && index <= 255))
|
if (index <= 0x1f || (index >= 127 && index <= 255))
|
||||||
glyphsMap[glyph] = encodingMap[i] += kCmapGlyphOffset;
|
glyphsMap[glyph] = encodingMap[i] += kCmapGlyphOffset;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user