pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1742946 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FontMapperImpl.java
Date Mon, 09 May 2016 13:27:12 GMT
Author: tilman
Date: Mon May  9 13:27:12 2016
New Revision: 1742946

URL: http://svn.apache.org/viewvc?rev=1742946&view=rev
Log:
PDFBOX-3344: avoid ClassCastException

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FontMapperImpl.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FontMapperImpl.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FontMapperImpl.java?rev=1742946&r1=1742945&r2=1742946&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FontMapperImpl.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FontMapperImpl.java
Mon May  9 13:27:12 2016
@@ -30,8 +30,6 @@ import java.util.Map;
 import java.util.PriorityQueue;
 import java.util.Set;
 import org.apache.fontbox.FontBoxFont;
-import org.apache.fontbox.cff.CFFFont;
-import org.apache.fontbox.cff.CFFType1Font;
 import org.apache.fontbox.ttf.OpenTypeFont;
 import org.apache.fontbox.ttf.TTFParser;
 import org.apache.fontbox.ttf.TrueTypeFont;
@@ -381,10 +379,10 @@ final class FontMapperImpl implements Fo
             return t1;
         }
 
-        CFFFont cff = (CFFFont)findFont(FontFormat.OTF, postScriptName);
-        if (cff instanceof CFFType1Font)
+        OpenTypeFont otf = (OpenTypeFont) findFont(FontFormat.OTF, postScriptName);
+        if (otf instanceof OpenTypeFont)
         {
-            return cff;
+            return otf;
         }
 
         TrueTypeFont ttf = (TrueTypeFont)findFont(FontFormat.TTF, postScriptName);



Mime
View raw message