]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Merge revision 1356456 from trunk:
authorJeremias Maerki <jeremias@apache.org>
Tue, 9 Oct 2012 09:13:18 +0000 (09:13 +0000)
committerJeremias Maerki <jeremias@apache.org>
Tue, 9 Oct 2012 09:13:18 +0000 (09:13 +0000)
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

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);