From: Adrian Cumiskey Date: Thu, 17 Jul 2008 18:47:58 +0000 (+0000) Subject: I'm not really happy with this workaround, it is a bit of a hack (as Symbol and ZapfD... X-Git-Tag: fop-1_0~489 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=89c2011b3d6329bf957190e7b5316fff9fdec2bb;p=xmlgraphics-fop.git 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. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@677679 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/render/afp/fonts/AFPFontCollection.java b/src/java/org/apache/fop/render/afp/fonts/AFPFontCollection.java index 55953daf0..df2f4a105 100644 --- a/src/java/org/apache/fop/render/afp/fonts/AFPFontCollection.java +++ b/src/java/org/apache/fop/render/afp/fonts/AFPFontCollection.java @@ -97,6 +97,22 @@ public class AFPFontCollection implements FontCollection { 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);