|
|
|
@ -628,26 +628,26 @@ var Font = (function FontClosure() {
@@ -628,26 +628,26 @@ var Font = (function FontClosure() {
|
|
|
|
|
} |
|
|
|
|
} else if (isOpenTypeFile(file)) { |
|
|
|
|
// Sometimes the type/subtype can be a complete lie (see issue7598.pdf).
|
|
|
|
|
type = subtype = 'OpenType'; |
|
|
|
|
subtype = 'OpenType'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (subtype === 'CIDFontType0C' && type !== 'CIDFontType0') { |
|
|
|
|
type = 'CIDFontType0'; |
|
|
|
|
} |
|
|
|
|
if (subtype === 'OpenType') { |
|
|
|
|
type = 'OpenType'; |
|
|
|
|
} |
|
|
|
|
// Some CIDFontType0C fonts by mistake claim CIDFontType0.
|
|
|
|
|
if (type === 'CIDFontType0') { |
|
|
|
|
if (isType1File(file)) { |
|
|
|
|
subtype = 'CIDFontType0'; |
|
|
|
|
} else if (isOpenTypeFile(file)) { |
|
|
|
|
// Sometimes the type/subtype can be a complete lie (see issue6782.pdf).
|
|
|
|
|
type = subtype = 'OpenType'; |
|
|
|
|
subtype = 'OpenType'; |
|
|
|
|
} else { |
|
|
|
|
subtype = 'CIDFontType0C'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (subtype === 'OpenType' && type !== 'OpenType') { |
|
|
|
|
type = 'OpenType'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var data; |
|
|
|
|
switch (type) { |
|
|
|
@ -2144,11 +2144,12 @@ var Font = (function FontClosure() {
@@ -2144,11 +2144,12 @@ var Font = (function FontClosure() {
|
|
|
|
|
|
|
|
|
|
var isTrueType = !tables['CFF ']; |
|
|
|
|
if (!isTrueType) { |
|
|
|
|
// OpenType font
|
|
|
|
|
if ((header.version === 'OTTO' && !properties.composite) || |
|
|
|
|
// OpenType font (skip composite fonts with non-default CID to GID map).
|
|
|
|
|
if ((header.version === 'OTTO' && |
|
|
|
|
!(properties.composite && properties.cidToGidMap)) || |
|
|
|
|
!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); |
|
|
|
|
cff = new CFFFont(cffFile, properties); |
|
|
|
|
|
|
|
|
|