1
0
Fork 0
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:
Jonas Jenwald 2015-07-25 12:26:36 +02:00
parent 61f9052233
commit 0a024b5051
5 changed files with 17 additions and 1 deletions

View file

@ -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);