1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Fixing PDF bad structure and 'fi' ligature

This commit is contained in:
notmasteryet 2011-10-07 22:24:26 -05:00
parent 9733a2b0f7
commit 0c8f0cd6c2
4 changed files with 17 additions and 6 deletions

View file

@ -2550,7 +2550,7 @@ var Type2CFF = (function type2CFF() {
var defaultWidth = privateDict['defaultWidthX'];
var charstrings = [];
var differences = properties.differences;
var index = 0;
var index = properties.firstChar || 0;
for (var i = 1; i < charsets.length; i++) {
var code = -1;
var glyph = charsets[i];
@ -2562,7 +2562,8 @@ var Type2CFF = (function type2CFF() {
}
}
var mapping = properties.glyphs[glyph] || {};
var mapping =
properties.glyphs[glyph] || properties.glyphs[index] || {};
if (code == -1)
index = code = mapping.unicode || index;