|
|
@ -3637,231 +3637,236 @@ var CFFStandardStrings = [ |
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
// Type1Font is also a CIDFontType0.
|
|
|
|
// Type1Font is also a CIDFontType0.
|
|
|
|
var Type1Font = function Type1Font(name, file, properties) { |
|
|
|
var Type1Font = (function Type1FontClosure() { |
|
|
|
// Some bad generators embed pfb file as is, we have to strip 6-byte headers.
|
|
|
|
function Type1Font(name, file, properties) { |
|
|
|
// Also, length1 and length2 might be off by 6 bytes as well.
|
|
|
|
// Some bad generators embed pfb file as is, we have to strip 6-byte header.
|
|
|
|
// http://www.math.ubc.ca/~cass/piscript/type1.pdf
|
|
|
|
// Also, length1 and length2 might be off by 6 bytes as well.
|
|
|
|
var PFB_HEADER_SIZE = 6; |
|
|
|
// http://www.math.ubc.ca/~cass/piscript/type1.pdf
|
|
|
|
var headerBlockLength = properties.length1; |
|
|
|
var PFB_HEADER_SIZE = 6; |
|
|
|
var eexecBlockLength = properties.length2; |
|
|
|
var headerBlockLength = properties.length1; |
|
|
|
var pfbHeader = file.peekBytes(PFB_HEADER_SIZE); |
|
|
|
var eexecBlockLength = properties.length2; |
|
|
|
var pfbHeaderPresent = pfbHeader[0] === 0x80 && pfbHeader[1] === 0x01; |
|
|
|
var pfbHeader = file.peekBytes(PFB_HEADER_SIZE); |
|
|
|
if (pfbHeaderPresent) { |
|
|
|
var pfbHeaderPresent = pfbHeader[0] === 0x80 && pfbHeader[1] === 0x01; |
|
|
|
file.skip(PFB_HEADER_SIZE); |
|
|
|
if (pfbHeaderPresent) { |
|
|
|
headerBlockLength = (pfbHeader[5] << 24) | (pfbHeader[4] << 16) | |
|
|
|
file.skip(PFB_HEADER_SIZE); |
|
|
|
(pfbHeader[3] << 8) | pfbHeader[2]; |
|
|
|
headerBlockLength = (pfbHeader[5] << 24) | (pfbHeader[4] << 16) | |
|
|
|
} |
|
|
|
(pfbHeader[3] << 8) | pfbHeader[2]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Get the data block containing glyphs and subrs informations
|
|
|
|
// Get the data block containing glyphs and subrs informations
|
|
|
|
var headerBlock = new Stream(file.getBytes(headerBlockLength)); |
|
|
|
var headerBlock = new Stream(file.getBytes(headerBlockLength)); |
|
|
|
var headerBlockParser = new Type1Parser(headerBlock); |
|
|
|
var headerBlockParser = new Type1Parser(headerBlock); |
|
|
|
headerBlockParser.extractFontHeader(properties); |
|
|
|
headerBlockParser.extractFontHeader(properties); |
|
|
|
|
|
|
|
|
|
|
|
if (pfbHeaderPresent) { |
|
|
|
if (pfbHeaderPresent) { |
|
|
|
pfbHeader = file.getBytes(PFB_HEADER_SIZE); |
|
|
|
pfbHeader = file.getBytes(PFB_HEADER_SIZE); |
|
|
|
eexecBlockLength = (pfbHeader[5] << 24) | (pfbHeader[4] << 16) | |
|
|
|
eexecBlockLength = (pfbHeader[5] << 24) | (pfbHeader[4] << 16) | |
|
|
|
(pfbHeader[3] << 8) | pfbHeader[2]; |
|
|
|
(pfbHeader[3] << 8) | pfbHeader[2]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Decrypt the data blocks and retrieve it's content
|
|
|
|
// Decrypt the data blocks and retrieve it's content
|
|
|
|
var eexecBlock = new Stream(file.getBytes(eexecBlockLength)); |
|
|
|
var eexecBlock = new Stream(file.getBytes(eexecBlockLength)); |
|
|
|
var eexecBlockParser = new Type1Parser(eexecBlock, true); |
|
|
|
var eexecBlockParser = new Type1Parser(eexecBlock, true); |
|
|
|
var data = eexecBlockParser.extractFontProgram(); |
|
|
|
var data = eexecBlockParser.extractFontProgram(); |
|
|
|
for (var info in data.properties) { |
|
|
|
for (var info in data.properties) { |
|
|
|
properties[info] = data.properties[info]; |
|
|
|
properties[info] = data.properties[info]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var charstrings = data.charstrings; |
|
|
|
|
|
|
|
var type2Charstrings = this.getType2Charstrings(charstrings); |
|
|
|
|
|
|
|
var subrs = this.getType2Subrs(data.subrs); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.charstrings = charstrings; |
|
|
|
|
|
|
|
this.data = this.wrap(name, type2Charstrings, this.charstrings, |
|
|
|
|
|
|
|
subrs, properties); |
|
|
|
|
|
|
|
this.seacs = this.getSeacs(data.charstrings); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var charstrings = data.charstrings; |
|
|
|
Type1Font.prototype = { |
|
|
|
var type2Charstrings = this.getType2Charstrings(charstrings); |
|
|
|
get numGlyphs() { |
|
|
|
var subrs = this.getType2Subrs(data.subrs); |
|
|
|
return this.charstrings.length + 1; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
this.charstrings = charstrings; |
|
|
|
getCharset: function Type1Font_getCharset() { |
|
|
|
this.data = this.wrap(name, type2Charstrings, this.charstrings, |
|
|
|
var charset = ['.notdef']; |
|
|
|
subrs, properties); |
|
|
|
var charstrings = this.charstrings; |
|
|
|
this.seacs = this.getSeacs(data.charstrings); |
|
|
|
for (var glyphId = 0; glyphId < charstrings.length; glyphId++) { |
|
|
|
}; |
|
|
|
charset.push(charstrings[glyphId].glyphName); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return charset; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
Type1Font.prototype = { |
|
|
|
getGlyphMapping: function Type1Font_getGlyphMapping(properties) { |
|
|
|
get numGlyphs() { |
|
|
|
var charstrings = this.charstrings; |
|
|
|
return this.charstrings.length + 1; |
|
|
|
var glyphNames = ['.notdef'], glyphId; |
|
|
|
}, |
|
|
|
for (glyphId = 0; glyphId < charstrings.length; glyphId++) { |
|
|
|
|
|
|
|
glyphNames.push(charstrings[glyphId].glyphName); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
var encoding = properties.builtInEncoding; |
|
|
|
|
|
|
|
if (encoding) { |
|
|
|
|
|
|
|
var builtInEncoding = Object.create(null); |
|
|
|
|
|
|
|
for (var charCode in encoding) { |
|
|
|
|
|
|
|
glyphId = glyphNames.indexOf(encoding[charCode]); |
|
|
|
|
|
|
|
if (glyphId >= 0) { |
|
|
|
|
|
|
|
builtInEncoding[charCode] = glyphId; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getCharset: function Type1Font_getCharset() { |
|
|
|
return type1FontGlyphMapping(properties, builtInEncoding, glyphNames); |
|
|
|
var charset = ['.notdef']; |
|
|
|
}, |
|
|
|
var charstrings = this.charstrings; |
|
|
|
|
|
|
|
for (var glyphId = 0; glyphId < charstrings.length; glyphId++) { |
|
|
|
getSeacs: function Type1Font_getSeacs(charstrings) { |
|
|
|
charset.push(charstrings[glyphId].glyphName); |
|
|
|
var i, ii; |
|
|
|
} |
|
|
|
var seacMap = []; |
|
|
|
return charset; |
|
|
|
for (i = 0, ii = charstrings.length; i < ii; i++) { |
|
|
|
}, |
|
|
|
var charstring = charstrings[i]; |
|
|
|
|
|
|
|
if (charstring.seac) { |
|
|
|
getGlyphMapping: function Type1Font_getGlyphMapping(properties) { |
|
|
|
// Offset by 1 for .notdef
|
|
|
|
var charstrings = this.charstrings; |
|
|
|
seacMap[i + 1] = charstring.seac; |
|
|
|
var glyphNames = ['.notdef'], glyphId; |
|
|
|
|
|
|
|
for (glyphId = 0; glyphId < charstrings.length; glyphId++) { |
|
|
|
|
|
|
|
glyphNames.push(charstrings[glyphId].glyphName); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
var encoding = properties.builtInEncoding; |
|
|
|
|
|
|
|
if (encoding) { |
|
|
|
|
|
|
|
var builtInEncoding = Object.create(null); |
|
|
|
|
|
|
|
for (var charCode in encoding) { |
|
|
|
|
|
|
|
glyphId = glyphNames.indexOf(encoding[charCode]); |
|
|
|
|
|
|
|
if (glyphId >= 0) { |
|
|
|
|
|
|
|
builtInEncoding[charCode] = glyphId; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return seacMap; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
return type1FontGlyphMapping(properties, builtInEncoding, glyphNames); |
|
|
|
getType2Charstrings: function Type1Font_getType2Charstrings( |
|
|
|
}, |
|
|
|
type1Charstrings) { |
|
|
|
|
|
|
|
var type2Charstrings = []; |
|
|
|
|
|
|
|
for (var i = 0, ii = type1Charstrings.length; i < ii; i++) { |
|
|
|
|
|
|
|
type2Charstrings.push(type1Charstrings[i].charstring); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return type2Charstrings; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getSeacs: function Type1Font_getSeacs(charstrings) { |
|
|
|
getType2Subrs: function Type1Font_getType2Subrs(type1Subrs) { |
|
|
|
var i, ii; |
|
|
|
var bias = 0; |
|
|
|
var seacMap = []; |
|
|
|
var count = type1Subrs.length; |
|
|
|
for (i = 0, ii = charstrings.length; i < ii; i++) { |
|
|
|
if (count < 1133) { |
|
|
|
var charstring = charstrings[i]; |
|
|
|
bias = 107; |
|
|
|
if (charstring.seac) { |
|
|
|
} else if (count < 33769) { |
|
|
|
// Offset by 1 for .notdef
|
|
|
|
bias = 1131; |
|
|
|
seacMap[i + 1] = charstring.seac; |
|
|
|
} else { |
|
|
|
|
|
|
|
bias = 32768; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return seacMap; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getType2Charstrings: function Type1Font_getType2Charstrings( |
|
|
|
|
|
|
|
type1Charstrings) { |
|
|
|
|
|
|
|
var type2Charstrings = []; |
|
|
|
|
|
|
|
for (var i = 0, ii = type1Charstrings.length; i < ii; i++) { |
|
|
|
|
|
|
|
type2Charstrings.push(type1Charstrings[i].charstring); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return type2Charstrings; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getType2Subrs: function Type1Font_getType2Subrs(type1Subrs) { |
|
|
|
// Add a bunch of empty subrs to deal with the Type2 bias
|
|
|
|
var bias = 0; |
|
|
|
var type2Subrs = []; |
|
|
|
var count = type1Subrs.length; |
|
|
|
var i; |
|
|
|
if (count < 1133) { |
|
|
|
for (i = 0; i < bias; i++) { |
|
|
|
bias = 107; |
|
|
|
type2Subrs.push([0x0B]); |
|
|
|
} else if (count < 33769) { |
|
|
|
} |
|
|
|
bias = 1131; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
bias = 32768; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add a bunch of empty subrs to deal with the Type2 bias
|
|
|
|
for (i = 0; i < count; i++) { |
|
|
|
var type2Subrs = []; |
|
|
|
type2Subrs.push(type1Subrs[i]); |
|
|
|
var i; |
|
|
|
} |
|
|
|
for (i = 0; i < bias; i++) { |
|
|
|
|
|
|
|
type2Subrs.push([0x0B]); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < count; i++) { |
|
|
|
return type2Subrs; |
|
|
|
type2Subrs.push(type1Subrs[i]); |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return type2Subrs; |
|
|
|
wrap: function Type1Font_wrap(name, glyphs, charstrings, subrs, |
|
|
|
}, |
|
|
|
properties) { |
|
|
|
|
|
|
|
var cff = new CFF(); |
|
|
|
wrap: function Type1Font_wrap(name, glyphs, charstrings, subrs, properties) { |
|
|
|
cff.header = new CFFHeader(1, 0, 4, 4); |
|
|
|
var cff = new CFF(); |
|
|
|
|
|
|
|
cff.header = new CFFHeader(1, 0, 4, 4); |
|
|
|
cff.names = [name]; |
|
|
|
|
|
|
|
|
|
|
|
cff.names = [name]; |
|
|
|
var topDict = new CFFTopDict(); |
|
|
|
|
|
|
|
// CFF strings IDs 0...390 are predefined names, so refering
|
|
|
|
var topDict = new CFFTopDict(); |
|
|
|
// to entries in our own String INDEX starts at SID 391.
|
|
|
|
// CFF strings IDs 0...390 are predefined names, so refering
|
|
|
|
topDict.setByName('version', 391); |
|
|
|
// to entries in our own String INDEX starts at SID 391.
|
|
|
|
topDict.setByName('Notice', 392); |
|
|
|
topDict.setByName('version', 391); |
|
|
|
topDict.setByName('FullName', 393); |
|
|
|
topDict.setByName('Notice', 392); |
|
|
|
topDict.setByName('FamilyName', 394); |
|
|
|
topDict.setByName('FullName', 393); |
|
|
|
topDict.setByName('Weight', 395); |
|
|
|
topDict.setByName('FamilyName', 394); |
|
|
|
topDict.setByName('Encoding', null); // placeholder
|
|
|
|
topDict.setByName('Weight', 395); |
|
|
|
topDict.setByName('FontMatrix', properties.fontMatrix); |
|
|
|
topDict.setByName('Encoding', null); // placeholder
|
|
|
|
topDict.setByName('FontBBox', properties.bbox); |
|
|
|
topDict.setByName('FontMatrix', properties.fontMatrix); |
|
|
|
topDict.setByName('charset', null); // placeholder
|
|
|
|
topDict.setByName('FontBBox', properties.bbox); |
|
|
|
topDict.setByName('CharStrings', null); // placeholder
|
|
|
|
topDict.setByName('charset', null); // placeholder
|
|
|
|
topDict.setByName('Private', null); // placeholder
|
|
|
|
topDict.setByName('CharStrings', null); // placeholder
|
|
|
|
cff.topDict = topDict; |
|
|
|
topDict.setByName('Private', null); // placeholder
|
|
|
|
|
|
|
|
cff.topDict = topDict; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var strings = new CFFStrings(); |
|
|
|
|
|
|
|
strings.add('Version 0.11'); // Version
|
|
|
|
|
|
|
|
strings.add('See original notice'); // Notice
|
|
|
|
|
|
|
|
strings.add(name); // FullName
|
|
|
|
|
|
|
|
strings.add(name); // FamilyName
|
|
|
|
|
|
|
|
strings.add('Medium'); // Weight
|
|
|
|
|
|
|
|
cff.strings = strings; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cff.globalSubrIndex = new CFFIndex(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var count = glyphs.length; |
|
|
|
|
|
|
|
var charsetArray = [0]; |
|
|
|
|
|
|
|
var i, ii; |
|
|
|
|
|
|
|
for (i = 0; i < count; i++) { |
|
|
|
|
|
|
|
var index = CFFStandardStrings.indexOf(charstrings[i].glyphName); |
|
|
|
|
|
|
|
// TODO: Insert the string and correctly map it. Previously it was
|
|
|
|
|
|
|
|
// thought mapping names that aren't in the standard strings to .notdef
|
|
|
|
|
|
|
|
// was fine, however in issue818 when mapping them all to .notdef the
|
|
|
|
|
|
|
|
// adieresis glyph no longer worked.
|
|
|
|
|
|
|
|
if (index === -1) { |
|
|
|
|
|
|
|
index = 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
charsetArray.push((index >> 8) & 0xff, index & 0xff); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
cff.charset = new CFFCharset(false, 0, [], charsetArray); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var charStringsIndex = new CFFIndex(); |
|
|
|
var strings = new CFFStrings(); |
|
|
|
charStringsIndex.add([0x8B, 0x0E]); // .notdef
|
|
|
|
strings.add('Version 0.11'); // Version
|
|
|
|
for (i = 0; i < count; i++) { |
|
|
|
strings.add('See original notice'); // Notice
|
|
|
|
charStringsIndex.add(glyphs[i]); |
|
|
|
strings.add(name); // FullName
|
|
|
|
} |
|
|
|
strings.add(name); // FamilyName
|
|
|
|
cff.charStrings = charStringsIndex; |
|
|
|
strings.add('Medium'); // Weight
|
|
|
|
|
|
|
|
cff.strings = strings; |
|
|
|
var privateDict = new CFFPrivateDict(); |
|
|
|
|
|
|
|
privateDict.setByName('Subrs', null); // placeholder
|
|
|
|
cff.globalSubrIndex = new CFFIndex(); |
|
|
|
var fields = [ |
|
|
|
|
|
|
|
'BlueValues', |
|
|
|
var count = glyphs.length; |
|
|
|
'OtherBlues', |
|
|
|
var charsetArray = [0]; |
|
|
|
'FamilyBlues', |
|
|
|
var i, ii; |
|
|
|
'FamilyOtherBlues', |
|
|
|
for (i = 0; i < count; i++) { |
|
|
|
'StemSnapH', |
|
|
|
var index = CFFStandardStrings.indexOf(charstrings[i].glyphName); |
|
|
|
'StemSnapV', |
|
|
|
// TODO: Insert the string and correctly map it. Previously it was
|
|
|
|
'BlueShift', |
|
|
|
// thought mapping names that aren't in the standard strings to .notdef
|
|
|
|
'BlueFuzz', |
|
|
|
// was fine, however in issue818 when mapping them all to .notdef the
|
|
|
|
'BlueScale', |
|
|
|
// adieresis glyph no longer worked.
|
|
|
|
'LanguageGroup', |
|
|
|
if (index === -1) { |
|
|
|
'ExpansionFactor', |
|
|
|
index = 0; |
|
|
|
'ForceBold', |
|
|
|
} |
|
|
|
'StdHW', |
|
|
|
charsetArray.push((index >> 8) & 0xff, index & 0xff); |
|
|
|
'StdVW' |
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
for (i = 0, ii = fields.length; i < ii; i++) { |
|
|
|
|
|
|
|
var field = fields[i]; |
|
|
|
|
|
|
|
if (!(field in properties.privateData)) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
var value = properties.privateData[field]; |
|
|
|
cff.charset = new CFFCharset(false, 0, [], charsetArray); |
|
|
|
if (isArray(value)) { |
|
|
|
|
|
|
|
// All of the private dictionary array data in CFF must be stored as
|
|
|
|
var charStringsIndex = new CFFIndex(); |
|
|
|
// "delta-encoded" numbers.
|
|
|
|
charStringsIndex.add([0x8B, 0x0E]); // .notdef
|
|
|
|
for (var j = value.length - 1; j > 0; j--) { |
|
|
|
for (i = 0; i < count; i++) { |
|
|
|
value[j] -= value[j - 1]; // ... difference from previous value
|
|
|
|
charStringsIndex.add(glyphs[i]); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
cff.charStrings = charStringsIndex; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var privateDict = new CFFPrivateDict(); |
|
|
|
|
|
|
|
privateDict.setByName('Subrs', null); // placeholder
|
|
|
|
|
|
|
|
var fields = [ |
|
|
|
|
|
|
|
'BlueValues', |
|
|
|
|
|
|
|
'OtherBlues', |
|
|
|
|
|
|
|
'FamilyBlues', |
|
|
|
|
|
|
|
'FamilyOtherBlues', |
|
|
|
|
|
|
|
'StemSnapH', |
|
|
|
|
|
|
|
'StemSnapV', |
|
|
|
|
|
|
|
'BlueShift', |
|
|
|
|
|
|
|
'BlueFuzz', |
|
|
|
|
|
|
|
'BlueScale', |
|
|
|
|
|
|
|
'LanguageGroup', |
|
|
|
|
|
|
|
'ExpansionFactor', |
|
|
|
|
|
|
|
'ForceBold', |
|
|
|
|
|
|
|
'StdHW', |
|
|
|
|
|
|
|
'StdVW' |
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
for (i = 0, ii = fields.length; i < ii; i++) { |
|
|
|
|
|
|
|
var field = fields[i]; |
|
|
|
|
|
|
|
if (!(field in properties.privateData)) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
var value = properties.privateData[field]; |
|
|
|
|
|
|
|
if (isArray(value)) { |
|
|
|
|
|
|
|
// All of the private dictionary array data in CFF must be stored as
|
|
|
|
|
|
|
|
// "delta-encoded" numbers.
|
|
|
|
|
|
|
|
for (var j = value.length - 1; j > 0; j--) { |
|
|
|
|
|
|
|
value[j] -= value[j - 1]; // ... difference from previous value
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
privateDict.setByName(field, value); |
|
|
|
} |
|
|
|
} |
|
|
|
privateDict.setByName(field, value); |
|
|
|
cff.topDict.privateDict = privateDict; |
|
|
|
} |
|
|
|
|
|
|
|
cff.topDict.privateDict = privateDict; |
|
|
|
var subrIndex = new CFFIndex(); |
|
|
|
|
|
|
|
for (i = 0, ii = subrs.length; i < ii; i++) { |
|
|
|
|
|
|
|
subrIndex.add(subrs[i]); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
privateDict.subrsIndex = subrIndex; |
|
|
|
|
|
|
|
|
|
|
|
var subrIndex = new CFFIndex(); |
|
|
|
var compiler = new CFFCompiler(cff); |
|
|
|
for (i = 0, ii = subrs.length; i < ii; i++) { |
|
|
|
return compiler.compile(); |
|
|
|
subrIndex.add(subrs[i]); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
privateDict.subrsIndex = subrIndex; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
var compiler = new CFFCompiler(cff); |
|
|
|
return Type1Font; |
|
|
|
return compiler.compile(); |
|
|
|
})(); |
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var CFFFont = (function CFFFontClosure() { |
|
|
|
var CFFFont = (function CFFFontClosure() { |
|
|
|
function CFFFont(file, properties) { |
|
|
|
function CFFFont(file, properties) { |
|
|
|