Author: rmeyer
Date: Mon Oct 21 14:54:09 2013
New Revision: 1534195

URL: http://svn.apache.org/r1534195
Log:
FOP-2299: Non Unicode named glyphs not loaded for Type1 fonts

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/AFMFile.java
    
xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/AFMFile.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/AFMFile.java?rev=1534195&r1=1534194&r2=1534195&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/AFMFile.java 
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/AFMFile.java Mon 
Oct 21 14:54:09 2013
@@ -319,7 +319,7 @@ public class AFMFile {
      */
     public void addCharMetrics(AFMCharMetrics metrics) {
         String name = metrics.getCharName();
-        if (metrics.getUnicodeSequence() == null) {
+        if (metrics.getUnicodeSequence() == null && name.equals(".notdef")) {
             //Ignore as no Unicode assignment is possible
             return;
         }

Modified: 
xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java?rev=1534195&r1=1534194&r2=1534195&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java 
(original)
+++ 
xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java 
Mon Oct 21 14:54:09 2013
@@ -393,10 +393,7 @@ public class Type1FontLoader extends Fon
         List<AFMCharMetrics> chars = afm.getCharMetrics();
         for (AFMCharMetrics charMetrics : chars) {
             if (charMetrics.getCharCode() >= 0) {
-                String u = charMetrics.getUnicodeSequence();
-                if (u != null && u.length() == 1) {
-                    mappingCount++;
-                }
+                mappingCount++;
             }
         }
         // ...and now build the table.
@@ -409,6 +406,10 @@ public class Type1FontLoader extends Fon
                 String unicodes = charMetrics.getUnicodeSequence();
                 if (unicodes == null) {
                     log.info("No Unicode mapping for glyph: " + charMetrics);
+                    table[idx] = charMetrics.getCharCode();
+                    idx++;
+                    table[idx] = charMetrics.getCharCode();
+                    idx++;
                 } else if (unicodes.length() == 1) {
                     table[idx] = charMetrics.getCharCode();
                     idx++;



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to