pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1559270 - /pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/Type1Parser.java
Date Fri, 17 Jan 2014 22:21:32 GMT
Author: lehmi
Date: Fri Jan 17 22:21:31 2014
New Revision: 1559270

URL: http://svn.apache.org/r1559270
Log:
PDFBOX-1844: added a type1 parser to fontbox, pdfbox doesn't use the AWT to render embedded
type1 fonts as proposed by John Hewson

Modified:
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/Type1Parser.java

Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/Type1Parser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/Type1Parser.java?rev=1559270&r1=1559269&r2=1559270&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/Type1Parser.java
(original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/Type1Parser.java
Fri Jan 17 22:21:31 2014
@@ -34,7 +34,6 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.commons.io.IOUtils;
-import org.apache.fontbox.cff.IndexData;
 import org.apache.fontbox.cff.Type1CharStringParser;
 import org.apache.fontbox.cff.Type1FontUtil;
 import org.apache.log4j.Logger;
@@ -326,9 +325,9 @@ public final class Type1Parser
             byte[] descBinary = new byte[sizeOfCharString];
             stream.read(descBinary, 0, sizeOfCharString);
             byte[] description = Type1FontUtil.charstringDecrypt(descBinary, lenIV);
-            Type1CharStringParser t1p = new Type1CharStringParser();
+            Type1CharStringParser t1p = new Type1CharStringParser("?", label);
             // TODO provide the local subroutine indexes
-            List<Object> operations = t1p.parse(description, new IndexData(0));
+            List<Object> operations = t1p.parse(description, new ArrayList<byte[]>());
             type1Font.addGlyphDescription(label, new GlyphDescription(operations));
 
             readToken(stream); // skip "ND" or "|-" token



Mime
View raw message