Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Aug 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/fonts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
1 change: 1 addition & 0 deletions test/pdfs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
!xref_command_missing.pdf
!issue1155r.pdf
!issue2017r.pdf
!bug1727053.pdf
!issue2391-1.pdf
!issue2391-2.pdf
!issue3214.pdf
Expand Down
Binary file added test/pdfs/bug1727053.pdf
Binary file not shown.
6 changes: 6 additions & 0 deletions test/test_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down