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:
parent
306119b12a
commit
a7f807b059
@ -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];
|
||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -12,6 +12,7 @@
|
||||
!xref_command_missing.pdf
|
||||
!issue1155r.pdf
|
||||
!issue2017r.pdf
|
||||
!bug1727053.pdf
|
||||
!issue2391-1.pdf
|
||||
!issue2391-2.pdf
|
||||
!issue3214.pdf
|
||||
|
BIN
test/pdfs/bug1727053.pdf
Normal file
BIN
test/pdfs/bug1727053.pdf
Normal file
Binary file not shown.
@ -242,6 +242,12 @@
|
||||
"lastPage": 4,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "bug1727053",
|
||||
"file": "pdfs/bug1727053.pdf",
|
||||
"md5": "8ed1e52da64000f9fdcb8b732f5a58f8",
|
||||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue3999",
|
||||
"file": "pdfs/issue3999.pdf",
|
||||
"md5": "0a59cd612e93758aa9f104470f45574b",
|
||||
|
Loading…
Reference in New Issue
Block a user