mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Merge pull request #6090 from Snuffleupagus/issue-6068
Map missing glyphs to the notdef glyph for TrueType (3, 1) fonts (issue 6068)
This commit is contained in:
commit
bf20334bea
4 changed files with 11 additions and 2 deletions
|
@ -4227,11 +4227,12 @@ var Font = (function FontClosure() {
|
|||
}
|
||||
}
|
||||
if (!found && properties.glyphNames) {
|
||||
// Try to map using the post table. There are currently no known
|
||||
// pdfs that this fixes.
|
||||
// Try to map using the post table.
|
||||
var glyphId = properties.glyphNames.indexOf(glyphName);
|
||||
if (glyphId > 0 && hasGlyph(glyphId, -1, -1)) {
|
||||
charCodeToGlyphId[charCode] = glyphId;
|
||||
} else {
|
||||
charCodeToGlyphId[charCode] = 0; // notdef
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue