]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fix for regression introduced by revision 1352986: NPE when auto-detecting TrueType...
authorJeremias Maerki <jeremias@apache.org>
Mon, 2 Jul 2012 20:20:18 +0000 (20:20 +0000)
committerJeremias Maerki <jeremias@apache.org>
Mon, 2 Jul 2012 20:20:18 +0000 (20:20 +0000)
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

index bc979f277d3502eb06d79c7935d4dbe596d068d6..3a2c71066de6cb9f69ebcd67144e352a5e7e6fd0 100644 (file)
@@ -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<String> getTTCnames(FontFileReader in) throws IOException {
+        this.fontFile = in;
+
         List<String> fontNames = new ArrayList<String>();
         String tag = in.readTTFString(4);