From 2a7e60cb3390a91d428fb607c0e19eaa911ec5b9 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Mon, 2 Jul 2012 20:20:18 +0000 Subject: [PATCH] Fix for regression introduced by revision 1352986: NPE when auto-detecting TrueType Collections. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1356456 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