diff options
author | Adrian Cumiskey <acumiskey@apache.org> | 2008-07-18 09:11:10 +0000 |
---|---|---|
committer | Adrian Cumiskey <acumiskey@apache.org> | 2008-07-18 09:11:10 +0000 |
commit | 18f3e432c4b8d9c7574e4feb4a1aca644ee50669 (patch) | |
tree | 6f09829f0f7b679de5221e7eb1610ee477f9f6b1 /src/java/org/apache/fop/render/afp | |
parent | 89c2011b3d6329bf957190e7b5316fff9fdec2bb (diff) | |
download | xmlgraphics-fop-18f3e432c4b8d9c7574e4feb4a1aca644ee50669.tar.gz xmlgraphics-fop-18f3e432c4b8d9c7574e4feb4a1aca644ee50669.zip |
Ok, I am much happier with this fix now, it doesn't feel like a temporary hack anymore :).
I have revised the fontLookup() algorithm in FontInfo so it now first tries to find matching font triplets by iterating over all the font family names *without substitutions*, if this fails it then iterates over all the font family names looking for matching font triplets *with substitutions* rather then just take the last one in the font family name list with substitutions.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@677863 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/afp')
-rw-r--r-- | src/java/org/apache/fop/render/afp/fonts/AFPFontCollection.java | 16 |
1 files changed, 0 insertions, 16 deletions
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 df2f4a105..55953daf0 100644 --- a/src/java/org/apache/fop/render/afp/fonts/AFPFontCollection.java +++ b/src/java/org/apache/fop/render/afp/fonts/AFPFontCollection.java @@ -97,22 +97,6 @@ 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); |