mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #7600 from Snuffleupagus/issue-7598
Check that Type1C fonts does not actually contain OpenType font files (issue 7598)
This commit is contained in:
commit
b112f9f9f4
4 changed files with 19 additions and 6 deletions
|
@ -689,12 +689,17 @@ var Font = (function FontClosure() {
|
|||
}
|
||||
|
||||
// Some fonts might use wrong font types for Type1C or CIDFontType0C
|
||||
if (subtype === 'Type1C' && (type !== 'Type1' && type !== 'MMType1')) {
|
||||
// Some TrueType fonts by mistake claim Type1C
|
||||
if (isTrueTypeFile(file)) {
|
||||
subtype = 'TrueType';
|
||||
} else {
|
||||
type = 'Type1';
|
||||
if (subtype === 'Type1C') {
|
||||
if (type !== 'Type1' && type !== 'MMType1') {
|
||||
// Some TrueType fonts by mistake claim Type1C
|
||||
if (isTrueTypeFile(file)) {
|
||||
subtype = 'TrueType';
|
||||
} else {
|
||||
type = 'Type1';
|
||||
}
|
||||
} else if (isOpenTypeFile(file)) {
|
||||
// Sometimes the type/subtype can be a complete lie (see issue7598.pdf).
|
||||
type = subtype = 'OpenType';
|
||||
}
|
||||
}
|
||||
if (subtype === 'CIDFontType0C' && type !== 'CIDFontType0') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue