case 0x00020000:
log.debug("PostScript format 2");
postScriptVersion = PostScriptVersion.V2;
- int numGlyphStrings = 0;
+ int numGlyphStrings = 257;
// Read Number of Glyphs
int l = fontFile.readTTFUShort();
for (int i = 0; i < l; i++) {
mtxTab[i].setIndex(fontFile.readTTFUShort());
- if (mtxTab[i].getIndex() > 257) {
- //Index is not in the Macintosh standard set
- numGlyphStrings++;
+ if (mtxTab[i].getIndex() > numGlyphStrings) {
+ numGlyphStrings = mtxTab[i].getIndex();
}
if (log.isTraceEnabled()) {
}
// firstChar=minIndex;
- String[] psGlyphsBuffer = new String[numGlyphStrings];
+ String[] psGlyphsBuffer = new String[numGlyphStrings - 257];
if (log.isDebugEnabled()) {
log.debug("Reading " + numGlyphStrings
+ " glyphnames, that are not in the standard Macintosh"