Merge pull request #12450 from janpe2/cff-xuid
Fix invalid `XUID` entries in CFF fonts
This commit is contained in:
commit
7ae3e13f16
@ -1407,6 +1407,12 @@ class CFFCompiler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const xuid = cff.topDict.getByName("XUID");
|
||||||
|
if (xuid && xuid.length > 16) {
|
||||||
|
// Length of XUID array must not be greater than 16 (issue #12399).
|
||||||
|
cff.topDict.removeByName("XUID");
|
||||||
|
}
|
||||||
|
|
||||||
cff.topDict.setByName("charset", 0);
|
cff.topDict.setByName("charset", 0);
|
||||||
var compiled = this.compileTopDicts(
|
var compiled = this.compileTopDicts(
|
||||||
[cff.topDict],
|
[cff.topDict],
|
||||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -169,6 +169,7 @@
|
|||||||
!issue5202.pdf
|
!issue5202.pdf
|
||||||
!images_1bit_grayscale.pdf
|
!images_1bit_grayscale.pdf
|
||||||
!issue5280.pdf
|
!issue5280.pdf
|
||||||
|
!issue12399_reduced.pdf
|
||||||
!issue5677.pdf
|
!issue5677.pdf
|
||||||
!issue5954.pdf
|
!issue5954.pdf
|
||||||
!issue6612.pdf
|
!issue6612.pdf
|
||||||
|
BIN
test/pdfs/issue12399_reduced.pdf
Normal file
BIN
test/pdfs/issue12399_reduced.pdf
Normal file
Binary file not shown.
@ -1914,6 +1914,12 @@
|
|||||||
"type": "eq",
|
"type": "eq",
|
||||||
"about": "Please note that this file currently renders incorrectly."
|
"about": "Please note that this file currently renders incorrectly."
|
||||||
},
|
},
|
||||||
|
{ "id": "issue12399",
|
||||||
|
"file": "pdfs/issue12399_reduced.pdf",
|
||||||
|
"md5": "01bdd258be93e10f8399708eecedbfd6",
|
||||||
|
"rounds": 1,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
{ "id": "issue5808-text",
|
{ "id": "issue5808-text",
|
||||||
"file": "pdfs/issue5808.pdf",
|
"file": "pdfs/issue5808.pdf",
|
||||||
"md5": "e0584dd540d7859d6c191aa53379692e",
|
"md5": "e0584dd540d7859d6c191aa53379692e",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user