Merge pull request #16465 from Snuffleupagus/issue-16464
Ignore named encoding for non-embedded symbol fonts (issue 16464)
This commit is contained in:
commit
daa48e5305
@ -3487,6 +3487,17 @@ class PartialEvaluator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const nonEmbeddedFont = !properties.file || properties.isInternalFont;
|
||||||
|
// Ignore an incorrectly specified named encoding for non-embedded
|
||||||
|
// symbol fonts (fixes issue16464.pdf).
|
||||||
|
if (
|
||||||
|
baseEncodingName &&
|
||||||
|
nonEmbeddedFont &&
|
||||||
|
getSymbolsFonts()[properties.name]
|
||||||
|
) {
|
||||||
|
baseEncodingName = null;
|
||||||
|
}
|
||||||
|
|
||||||
if (baseEncodingName) {
|
if (baseEncodingName) {
|
||||||
properties.defaultEncoding = getEncoding(baseEncodingName);
|
properties.defaultEncoding = getEncoding(baseEncodingName);
|
||||||
} else {
|
} else {
|
||||||
@ -3503,7 +3514,7 @@ class PartialEvaluator {
|
|||||||
// Heuristic: we have to check if the font is a standard one also
|
// Heuristic: we have to check if the font is a standard one also
|
||||||
if (isSymbolicFont) {
|
if (isSymbolicFont) {
|
||||||
encoding = MacRomanEncoding;
|
encoding = MacRomanEncoding;
|
||||||
if (!properties.file || properties.isInternalFont) {
|
if (nonEmbeddedFont) {
|
||||||
if (/Symbol/i.test(properties.name)) {
|
if (/Symbol/i.test(properties.name)) {
|
||||||
encoding = SymbolSetEncoding;
|
encoding = SymbolSetEncoding;
|
||||||
} else if (/Dingbats|Wingdings/i.test(properties.name)) {
|
} else if (/Dingbats|Wingdings/i.test(properties.name)) {
|
||||||
|
1
test/pdfs/issue16464.pdf.link
Normal file
1
test/pdfs/issue16464.pdf.link
Normal file
@ -0,0 +1 @@
|
|||||||
|
https://github.com/mozilla/pdf.js/files/11548733/DocumentWithCheckbox.pdf
|
@ -58,6 +58,14 @@
|
|||||||
"lastPage": 1,
|
"lastPage": 1,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
|
{ "id": "issue16464",
|
||||||
|
"file": "pdfs/issue16464.pdf",
|
||||||
|
"md5": "2bd97ff909e2185605788daa70de38ee",
|
||||||
|
"rounds": 1,
|
||||||
|
"link": true,
|
||||||
|
"lastPage": 1,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
{ "id": "tracemonkey-fbf",
|
{ "id": "tracemonkey-fbf",
|
||||||
"file": "pdfs/tracemonkey.pdf",
|
"file": "pdfs/tracemonkey.pdf",
|
||||||
"md5": "9a192d8b1a7dc652a19835f6f08098bd",
|
"md5": "9a192d8b1a7dc652a19835f6f08098bd",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user