diff options
author | Robert Meyer <rmeyer@apache.org> | 2015-08-01 15:35:12 +0000 |
---|---|---|
committer | Robert Meyer <rmeyer@apache.org> | 2015-08-01 15:35:12 +0000 |
commit | cc829b9753aafc5fca96ea4e633433cfbc2795bd (patch) | |
tree | c0755a5bf0d0a9e58b989e51c773e263764c7823 | |
parent | 946356166c77565a1044b015ac85508aa931940c (diff) | |
download | xmlgraphics-fop-cc829b9753aafc5fca96ea4e633433cfbc2795bd.tar.gz xmlgraphics-fop-cc829b9753aafc5fca96ea4e633433cfbc2795bd.zip |
FOP-2494 - Unable to use Ubuntu Mono Font
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1693719 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/java/org/apache/fop/fonts/truetype/OpenFont.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/fonts/truetype/OpenFont.java b/src/java/org/apache/fop/fonts/truetype/OpenFont.java index 9d3a4769d..b9dcfb936 100644 --- a/src/java/org/apache/fop/fonts/truetype/OpenFont.java +++ b/src/java/org/apache/fop/fonts/truetype/OpenFont.java @@ -1274,7 +1274,7 @@ public abstract class OpenFont { case 0x00020000: log.debug("PostScript format 2"); postScriptVersion = PostScriptVersion.V2; - int numGlyphStrings = 0; + int numGlyphStrings = 257; // Read Number of Glyphs int l = fontFile.readTTFUShort(); @@ -1283,9 +1283,8 @@ public abstract class OpenFont { 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()) { @@ -1294,7 +1293,7 @@ public abstract class OpenFont { } // 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" |