From 178b82a9c7c6af0e4e3ffc1ae768e304a5aa6791 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Tue, 9 Oct 2012 09:13:18 +0000 Subject: [PATCH] Merge revision 1356456 from trunk: Fix for regression introduced by revision 1352986: NPE when auto-detecting TrueType Collections. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-1_1@1395925 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fonts/truetype/TTFFile.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/fop/fonts/truetype/TTFFile.java b/src/java/org/apache/fop/fonts/truetype/TTFFile.java index bc979f277..3a2c71066 100644 --- a/src/java/org/apache/fop/fonts/truetype/TTFFile.java +++ b/src/java/org/apache/fop/fonts/truetype/TTFFile.java @@ -1672,7 +1672,7 @@ public class TTFFile { for (Integer unicodeKey2 : ckpx.keySet()) { Integer cidKey2 = unicodeToGlyph(unicodeKey2.intValue()); - Integer kern = (Integer)ckpx.get(unicodeKey2); + Integer kern = ckpx.get(unicodeKey2); Iterator uniMap = mtxTab[cidKey2.intValue()].getUnicodeIndex().listIterator(); while (uniMap.hasNext()) { @@ -1838,6 +1838,8 @@ public class TTFFile { * @throws IOException In case of an I/O problem */ public final List getTTCnames(FontFileReader in) throws IOException { + this.fontFile = in; + List fontNames = new ArrayList(); String tag = in.readTTFString(4); -- 2.39.5