mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Adjust the heuristics used to detect OpenType font file with CFF data (bug 1186827, bug 1182130, issue 6264)
*This is a tentative patch.* Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1186827. Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1182130. Fixes 6264.
This commit is contained in:
parent
61f9052233
commit
0a024b5051
5 changed files with 17 additions and 1 deletions
|
@ -4053,7 +4053,7 @@ var Font = (function FontClosure() {
|
|||
var isTrueType = !tables['CFF '];
|
||||
if (!isTrueType) {
|
||||
// OpenType font
|
||||
if (header.version === 'OTTO' ||
|
||||
if ((header.version === 'OTTO' && properties.type !== 'CIDFontType2') ||
|
||||
!tables.head || !tables.hhea || !tables.maxp || !tables.post) {
|
||||
// no major tables: throwing everything at CFFFont
|
||||
cffFile = new Stream(tables['CFF '].data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue