mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Merge pull request #11528 from janpe2/type1-nonemb-notdef
Hide .notdef glyphs in non-embedded Type1 fonts and don't ignore Widths
This commit is contained in:
commit
09a6e17d22
5 changed files with 125 additions and 8 deletions
|
@ -3184,6 +3184,16 @@ var Font = (function FontClosure() {
|
|||
// back to the char code.
|
||||
fontCharCode = this.toFontChar[charcode] || charcode;
|
||||
if (this.missingFile) {
|
||||
const glyphName =
|
||||
this.differences[charcode] || this.defaultEncoding[charcode];
|
||||
if (
|
||||
(glyphName === ".notdef" || glyphName === "") &&
|
||||
this.type === "Type1"
|
||||
) {
|
||||
// .notdef glyphs should be invisible in non-embedded Type1 fonts, so
|
||||
// replace them with spaces.
|
||||
fontCharCode = 0x20;
|
||||
}
|
||||
fontCharCode = mapSpecialUnicodeValues(fontCharCode);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue