1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

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:
Brendan Dahl 2015-08-03 09:43:33 -07:00
commit 977397ebfd
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);