|
|
|
@ -5205,13 +5205,21 @@ var Type1Parser = (function Type1ParserClosure() {
@@ -5205,13 +5205,21 @@ var Type1Parser = (function Type1ParserClosure() {
|
|
|
|
|
|
|
|
|
|
for (var j = 0; j < size; j++) { |
|
|
|
|
var token = this.getToken(); |
|
|
|
|
if (token === 'dup') { |
|
|
|
|
var index = this.readInt(); |
|
|
|
|
this.getToken(); // read in '/'
|
|
|
|
|
var glyph = this.getToken(); |
|
|
|
|
encoding[index] = glyph; |
|
|
|
|
this.getToken(); // read the in 'put'
|
|
|
|
|
// skipping till first dup or def (e.g. ignoring for statement)
|
|
|
|
|
while (token !== 'dup' && token !== 'def') { |
|
|
|
|
token = this.getToken(); |
|
|
|
|
if (token === null) { |
|
|
|
|
return; // invalid header
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (token === 'def') { |
|
|
|
|
break; // read all array data
|
|
|
|
|
} |
|
|
|
|
var index = this.readInt(); |
|
|
|
|
this.getToken(); // read in '/'
|
|
|
|
|
var glyph = this.getToken(); |
|
|
|
|
encoding[index] = glyph; |
|
|
|
|
this.getToken(); // read the in 'put'
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (properties.overridableEncoding && encoding) { |
|
|
|
@ -5219,6 +5227,13 @@ var Type1Parser = (function Type1ParserClosure() {
@@ -5219,6 +5227,13 @@ var Type1Parser = (function Type1ParserClosure() {
|
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case 'FontBBox': |
|
|
|
|
var fontBBox = this.readNumberArray(); |
|
|
|
|
// adjusting ascent/descent
|
|
|
|
|
properties.ascent = fontBBox[3]; |
|
|
|
|
properties.descent = fontBBox[1]; |
|
|
|
|
properties.ascentScaled = true; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|