Merge pull request #6270 from Snuffleupagus/opentype-cff-2
Adjust the heuristics used to detect OpenType font file with CFF data (bug 1186827, bug 1182130, issue 6264)
This commit is contained in:
commit
977397ebfd
@ -4053,7 +4053,7 @@ var Font = (function FontClosure() {
|
|||||||
var isTrueType = !tables['CFF '];
|
var isTrueType = !tables['CFF '];
|
||||||
if (!isTrueType) {
|
if (!isTrueType) {
|
||||||
// OpenType font
|
// OpenType font
|
||||||
if (header.version === 'OTTO' ||
|
if ((header.version === 'OTTO' && properties.type !== 'CIDFontType2') ||
|
||||||
!tables.head || !tables.hhea || !tables.maxp || !tables.post) {
|
!tables.head || !tables.hhea || !tables.maxp || !tables.post) {
|
||||||
// no major tables: throwing everything at CFFFont
|
// no major tables: throwing everything at CFFFont
|
||||||
cffFile = new Stream(tables['CFF '].data);
|
cffFile = new Stream(tables['CFF '].data);
|
||||||
|
2
test/pdfs/.gitignore
vendored
2
test/pdfs/.gitignore
vendored
@ -134,6 +134,8 @@
|
|||||||
!issue4800.pdf
|
!issue4800.pdf
|
||||||
!issue4801.pdf
|
!issue4801.pdf
|
||||||
!issue5334.pdf
|
!issue5334.pdf
|
||||||
|
!bug1186827.pdf
|
||||||
|
!issue215.pdf
|
||||||
!issue5540.pdf
|
!issue5540.pdf
|
||||||
!issue5549.pdf
|
!issue5549.pdf
|
||||||
!issue5475.pdf
|
!issue5475.pdf
|
||||||
|
BIN
test/pdfs/bug1186827.pdf
Normal file
BIN
test/pdfs/bug1186827.pdf
Normal file
Binary file not shown.
BIN
test/pdfs/issue215.pdf
Normal file
BIN
test/pdfs/issue215.pdf
Normal file
Binary file not shown.
@ -435,6 +435,20 @@
|
|||||||
"link": false,
|
"link": false,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
|
{ "id": "bug1186827",
|
||||||
|
"file": "pdfs/bug1186827.pdf",
|
||||||
|
"md5": "6c5526ae1a9d66cb517153001afc196e",
|
||||||
|
"rounds": 1,
|
||||||
|
"link": false,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
|
{ "id": "issue215",
|
||||||
|
"file": "pdfs/issue215.pdf",
|
||||||
|
"md5": "31f3dc60ecf008987d970edfd2b1df61",
|
||||||
|
"rounds": 1,
|
||||||
|
"link": false,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
{ "id": "bug850854",
|
{ "id": "bug850854",
|
||||||
"file": "pdfs/bug850854.pdf",
|
"file": "pdfs/bug850854.pdf",
|
||||||
"md5": "346a034a80120d123b9fefc42bcb11da",
|
"md5": "346a034a80120d123b9fefc42bcb11da",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user