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

Only use base encoding if it's populated. (bug 1727053)

The font dict in this file has an encoding entry, but only specifies a
differences map. The base encoding is empty in this case and shouldn't
be used.
This commit is contained in:
Brendan Dahl 2021-08-30 12:51:59 -07:00
parent 306119b12a
commit a7f807b059
4 changed files with 8 additions and 1 deletions

View file

@ -2629,7 +2629,7 @@ class Font {
let glyphName;
if (this.differences[charCode] !== undefined) {
glyphName = this.differences[charCode];
} else if (baseEncoding[charCode] !== "") {
} else if (baseEncoding.length && baseEncoding[charCode] !== "") {
glyphName = baseEncoding[charCode];
} else {
glyphName = StandardEncoding[charCode];