pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1646827 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDSimpleFont.java
Date Fri, 19 Dec 2014 19:08:18 GMT
Author: jahewson
Date: Fri Dec 19 19:08:17 2014
New Revision: 1646827

URL: http://svn.apache.org/r1646827
Log:
PDFBOX-2573: Avoid recursive definition of isSymbolic

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDSimpleFont.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDSimpleFont.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDSimpleFont.java?rev=1646827&r1=1646826&r2=1646827&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDSimpleFont.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDSimpleFont.java Fri
Dec 19 19:08:17 2014
@@ -109,14 +109,16 @@ public abstract class PDSimpleFont exten
             {
                 COSDictionary encodingDict = (COSDictionary)encoding;
                 Encoding builtIn = null;
-                if (!encodingDict.containsKey(COSName.BASE_ENCODING) && isSymbolic())
+                Boolean symbolic = getSymbolicFlag();
+                boolean isFlaggedAsSymbolic = symbolic != null && symbolic;
+                if (!encodingDict.containsKey(COSName.BASE_ENCODING) && isFlaggedAsSymbolic)
                 {
                     builtIn = readEncodingFromFont();
                 }
-                Boolean symbolic = getSymbolicFlag();
+
                 if (symbolic == null)
                 {
-                    symbolic = builtIn != null;
+                    symbolic = false;
                 }
 
                 if (builtIn == null && !encodingDict.containsKey(COSName.BASE_ENCODING)
&& symbolic)



Mime
View raw message