diff options
author | Adrian Cumiskey <acumiskey@apache.org> | 2008-07-17 18:49:36 +0000 |
---|---|---|
committer | Adrian Cumiskey <acumiskey@apache.org> | 2008-07-17 18:49:36 +0000 |
commit | e8d3199b5154012c1109085741b53f36b3a59282 (patch) | |
tree | d672fdbd170793873a40af98f69b0577f1e1c78b /src | |
parent | 96b06ff833f8c1059c3a5ae5a3bc023812e38a14 (diff) | |
download | xmlgraphics-fop-e8d3199b5154012c1109085741b53f36b3a59282.tar.gz xmlgraphics-fop-e8d3199b5154012c1109085741b53f36b3a59282.zip |
Merged revisions 677668,677679 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r677668 | acumiskey | 2008-07-17 19:25:11 +0100 (Thu, 17 Jul 2008) | 2 lines
Undoing this change for now until a better fix can be found as it breaks 4 unit tests.
........
r677679 | acumiskey | 2008-07-17 19:47:58 +0100 (Thu, 17 Jul 2008) | 2 lines
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/branches/Temp_AFPGOCAResources@677680 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/fop/fo/FOPropertyMapping.java | 2 | ||||
-rw-r--r-- | src/java/org/apache/fop/render/afp/fonts/AFPFontCollection.java | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/fo/FOPropertyMapping.java b/src/java/org/apache/fop/fo/FOPropertyMapping.java index e7e76176a..60317cf0d 100644 --- a/src/java/org/apache/fop/fo/FOPropertyMapping.java +++ b/src/java/org/apache/fop/fo/FOPropertyMapping.java @@ -963,7 +963,7 @@ public final class FOPropertyMapping implements Constants { // font-family m = new FontFamilyProperty.Maker(PR_FONT_FAMILY); m.setInherited(true); - m.setDefault("sans-serif"); + m.setDefault("sans-serif,Symbol,ZapfDingbats"); m.addShorthand(s_generics[PR_FONT]); addPropertyMaker("font-family", m); 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); |