1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Map missing glyphs to the notdef glyph for TrueType (3, 1) fonts regardless if the 'post' table is defined or not (issue 6889)

This commit is contained in:
Jonas Jenwald 2016-01-17 22:03:21 +01:00
parent e60fde73ca
commit 4855d4cc9f
4 changed files with 12 additions and 2 deletions

View file

@ -4362,10 +4362,12 @@ var Font = (function FontClosure() {
var glyphId = properties.glyphNames.indexOf(glyphName);
if (glyphId > 0 && hasGlyph(glyphId, -1, -1)) {
charCodeToGlyphId[charCode] = glyphId;
} else {
charCodeToGlyphId[charCode] = 0; // notdef
found = true;
}
}
if (!found) {
charCodeToGlyphId[charCode] = 0; // notdef
}
}
} else if (cmapPlatformId === 0 && cmapEncodingId === 0) {
// Default Unicode semantics, use the charcodes as is.