pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1621010 - in /pdfbox/branches/no-awt/fontbox/src/main/java/org/apache/fontbox/cff: CFFFont.java CFFParser.java
Date Thu, 28 Aug 2014 01:01:34 GMT
Author: jahewson
Date: Thu Aug 28 01:01:34 2014
New Revision: 1621010

URL: http://svn.apache.org/r1621010
Log:
PDFBOX-2262: Made CFF charstring count public

Modified:
    pdfbox/branches/no-awt/fontbox/src/main/java/org/apache/fontbox/cff/CFFFont.java
    pdfbox/branches/no-awt/fontbox/src/main/java/org/apache/fontbox/cff/CFFParser.java

Modified: pdfbox/branches/no-awt/fontbox/src/main/java/org/apache/fontbox/cff/CFFFont.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/no-awt/fontbox/src/main/java/org/apache/fontbox/cff/CFFFont.java?rev=1621010&r1=1621009&r2=1621010&view=diff
==============================================================================
--- pdfbox/branches/no-awt/fontbox/src/main/java/org/apache/fontbox/cff/CFFFont.java (original)
+++ pdfbox/branches/no-awt/fontbox/src/main/java/org/apache/fontbox/cff/CFFFont.java Thu Aug
28 01:01:34 2014
@@ -122,12 +122,20 @@ public abstract class CFFFont
      *
      * @return the dictionary
      */
-    List<byte[]> getCharStrings()
+    List<byte[]> getCharStringBytes()
     {
         return charStrings;
     }
 
     /**
+     * Returns the number of charstrings in the font.
+     */
+    public int getNumCharStrings()
+    {
+        return charStrings.size();
+    }
+
+    /**
      * Sets the global subroutine index data.
      * 
      * @param globalSubrIndexValue the IndexData object containing the global subroutines

Modified: pdfbox/branches/no-awt/fontbox/src/main/java/org/apache/fontbox/cff/CFFParser.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/no-awt/fontbox/src/main/java/org/apache/fontbox/cff/CFFParser.java?rev=1621010&r1=1621009&r2=1621010&view=diff
==============================================================================
--- pdfbox/branches/no-awt/fontbox/src/main/java/org/apache/fontbox/cff/CFFParser.java (original)
+++ pdfbox/branches/no-awt/fontbox/src/main/java/org/apache/fontbox/cff/CFFParser.java Thu
Aug 28 01:01:34 2014
@@ -401,11 +401,11 @@ public class CFFParser
         font.setCharset(charset);
 
         // charstrings dict
-        font.getCharStrings().add(charStringsIndex.getBytes(0)); // .notdef
+        font.getCharStringBytes().add(charStringsIndex.getBytes(0)); // .notdef
         for (int i = 1; i < charStringsIndex.getCount(); i++)
         {
             byte[] bytes = charStringsIndex.getBytes(i);
-            font.getCharStrings().add(bytes);
+            font.getCharStringBytes().add(bytes);
         }
 
         // format-specific dictionaries



Mime
View raw message