xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r450844 - in /xmlgraphics/fop/branches/foray-font/src/java/org/apache/fop/pdf: PDFFactory.java PDFToUnicodeCMap.java
Date Thu, 28 Sep 2006 13:10:52 GMT
Author: bdelacretaz
Date: Thu Sep 28 06:10:51 2006
New Revision: 450844

URL: http://svn.apache.org/viewvc?view=rev&rev=450844
Log:
Testing with simulated ToUnicode table

Modified:
    xmlgraphics/fop/branches/foray-font/src/java/org/apache/fop/pdf/PDFFactory.java
    xmlgraphics/fop/branches/foray-font/src/java/org/apache/fop/pdf/PDFToUnicodeCMap.java

Modified: xmlgraphics/fop/branches/foray-font/src/java/org/apache/fop/pdf/PDFFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/foray-font/src/java/org/apache/fop/pdf/PDFFactory.java?view=diff&rev=450844&r1=450843&r2=450844
==============================================================================
--- xmlgraphics/fop/branches/foray-font/src/java/org/apache/fop/pdf/PDFFactory.java (original)
+++ xmlgraphics/fop/branches/foray-font/src/java/org/apache/fop/pdf/PDFFactory.java Thu Sep
28 06:10:51 2006
@@ -1027,7 +1027,7 @@
             if (fontSubType == PDFFont.TYPE0) {
                 PDFCIDSystemInfo sysInfo = new PDFCIDSystemInfo("Adobe", "UCS", 0);
                 
-                PDFToUnicodeCMap cmap = new PDFToUnicodeCMap(getDocument(),font.getPostscriptName(),sysInfo,fontUse);
+                PDFToUnicodeCMap cmap = new PDFToUnicodeCMap(getDocument(),"Identity-H",sysInfo,fontUse);
                 getDocument().registerObject(cmap);
                 
                 PDFCIDFont cidFont = new PDFCIDFont(font.getPostscriptName(),
@@ -1049,7 +1049,7 @@
         }
         return pdfFont;
     }
-
+    
     public PDFWArray getSubsetWidths(FontPDF fontOutput) {
         // Create widths for reencoded chars
         // TODO vh: for now fonts aren't subsetted (I think)

Modified: xmlgraphics/fop/branches/foray-font/src/java/org/apache/fop/pdf/PDFToUnicodeCMap.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/foray-font/src/java/org/apache/fop/pdf/PDFToUnicodeCMap.java?view=diff&rev=450844&r1=450843&r2=450844
==============================================================================
--- xmlgraphics/fop/branches/foray-font/src/java/org/apache/fop/pdf/PDFToUnicodeCMap.java
(original)
+++ xmlgraphics/fop/branches/foray-font/src/java/org/apache/fop/pdf/PDFToUnicodeCMap.java
Thu Sep 28 06:10:51 2006
@@ -54,6 +54,34 @@
     }
 
     public void fillInPDF(final StringBuffer p) {
+        // Just a fixed simulated cmap to test the basic mechanism,
+        // won't work correctly for many chars, of course
+        final String simulatedIdentityCmap = 
+        "/CIDInit /ProcSet findresource begin"
+        +"\n12 dict begin"
+        +"\nbegincmap"
+        +"\n/CIDSystemInfo"
+        +"\n<</Registry (Adobe)"
+        +"\n/Ordering(UCS)"
+        +"\n/Supplement 0"
+        +"\n>>def"
+        +"\n/CMapName /Adobe−Identity−UCS def"
+        +"\n/CMapType 2 def"
+        +"\n1 begincodespacerange"
+        +"\n<0000> <FFFF>"
+        +"\nendcodespacerange"
+        +"\n1 beginbfrange"
+        +"\n<0000> <005E> <001F>"
+        +"\nendbfrange"
+        +"\nendcmap"
+        +"\nCMapName currentdict /CMapdefineresource pop"
+        +"\nend"
+        +"\nend"
+        ;
+        add(simulatedIdentityCmap);
+    }
+
+    public void DISABLED_fillInPDF(final StringBuffer p) {
         writeCIDInit(p);
         writeCIDSystemInfo(p);
         writeVersionTypeName(p);



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message