mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
extracted filetype in pdf.js instead of fonts.js
This commit is contained in:
parent
37ef03d51e
commit
8763002c44
2 changed files with 9 additions and 2 deletions
4
fonts.js
4
fonts.js
|
@ -392,8 +392,8 @@ var Font = (function() {
|
|||
case 'CIDFontType0':
|
||||
this.mimetype = 'font/opentype';
|
||||
|
||||
var subtype = file.dict.get('Subtype');
|
||||
if (subtype && subtype.name === 'Type1C') {
|
||||
var subtype = properties.subtype;
|
||||
if (subtype === 'Type1C') {
|
||||
var cff = new Type2CFF(file);
|
||||
} else {
|
||||
var cff = new CFF(name, file, properties);
|
||||
|
|
7
pdf.js
7
pdf.js
|
@ -3814,8 +3814,15 @@ var PartialEvaluator = (function() {
|
|||
}
|
||||
}
|
||||
|
||||
if (fontFile && fontFile.dict) {
|
||||
var fileType = fontFile.dict.get('Subtype');
|
||||
if (fileType)
|
||||
fileType = fileType.name;
|
||||
}
|
||||
|
||||
var properties = {
|
||||
type: subType.name,
|
||||
subtype: fileType,
|
||||
encoding: encodingMap,
|
||||
charset: charset,
|
||||
firstChar: fontDict.get('FirstChar'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue