From 18f3e432c4b8d9c7574e4feb4a1aca644ee50669 Mon Sep 17 00:00:00 2001 From: Adrian Cumiskey Date: Fri, 18 Jul 2008 09:11:10 +0000 Subject: 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 --- .../apache/fop/render/afp/fonts/AFPFontCollection.java | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/java/org/apache/fop/render/afp') 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); -- cgit v1.2.3