You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ac...@apache.org on 2008/07/17 20:47:58 UTC

svn commit: r677679 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/fonts/AFPFontCollection.java

Author: acumiskey
Date: Thu Jul 17 11:47:58 2008
New Revision: 677679

URL: http://svn.apache.org/viewvc?rev=677679&view=rev
Log:
I'm not really happy with this workaround, it is a bit of a hack (as Symbol and ZapfDingbats are not available) but it does prevent the IllegalArgumentException from being thrown.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/fonts/AFPFontCollection.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/fonts/AFPFontCollection.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/fonts/AFPFontCollection.java?rev=677679&r1=677678&r2=677679&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/fonts/AFPFontCollection.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/fonts/AFPFontCollection.java Thu Jul 17 11:47:58 2008
@@ -97,6 +97,22 @@
             fontInfo.addMetrics("F" + num, bf);
             num++;
         }
+        if (fontInfo.fontLookup("Symbol", Font.STYLE_NORMAL, Font.WEIGHT_NORMAL) == null) {
+            FontTriplet ft = fontInfo.fontLookup(
+                    "sans-serif", Font.STYLE_NORMAL, Font.WEIGHT_NORMAL);
+            fontInfo.addFontProperties(
+                    fontInfo.getInternalFontKey(ft),
+                    "Symbol", Font.STYLE_NORMAL, Font.WEIGHT_NORMAL);
+            num++;
+        }
+        if (fontInfo.fontLookup("ZapfDingbats", Font.STYLE_NORMAL, Font.WEIGHT_NORMAL) == null) {
+            FontTriplet ft = fontInfo.fontLookup(
+                    "sans-serif", Font.STYLE_NORMAL, Font.WEIGHT_NORMAL);
+            fontInfo.addFontProperties(
+                    fontInfo.getInternalFontKey(ft),
+                    "ZapfDingbats", Font.STYLE_NORMAL, Font.WEIGHT_NORMAL);
+            num++;
+        }
         if (fontInfo.fontLookup("any", Font.STYLE_NORMAL, Font.WEIGHT_NORMAL) == null) {
             FontTriplet ft = fontInfo.fontLookup(
                     "sans-serif", Font.STYLE_NORMAL, Font.WEIGHT_NORMAL);



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