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:
parent
9733a2b0f7
commit
0c8f0cd6c2
4 changed files with 17 additions and 6 deletions
5
fonts.js
5
fonts.js
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue