From 91a223f9a2d6a9a502b293653b39e4d506a245da Mon Sep 17 00:00:00 2001 From: Adrian Cumiskey Date: Tue, 18 Nov 2008 09:48:38 +0000 Subject: [PATCH] Default 10pt font fallback removed. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@718536 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/afp/svg/AFPTextPainter.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/java/org/apache/fop/afp/svg/AFPTextPainter.java b/src/java/org/apache/fop/afp/svg/AFPTextPainter.java index 2d68616a3..a5758732a 100644 --- a/src/java/org/apache/fop/afp/svg/AFPTextPainter.java +++ b/src/java/org/apache/fop/afp/svg/AFPTextPainter.java @@ -115,8 +115,8 @@ public class AFPTextPainter implements TextPainter { private boolean hasUnsupportedAttributes(AttributedCharacterIterator aci) { boolean hasUnsupported = false; + Font font = getFont(aci); String text = getText(aci); - Font font = makeFont(aci); if (hasUnsupportedGlyphs(text, font)) { log.trace("-> Unsupported glyphs found"); hasUnsupported = true; @@ -228,8 +228,10 @@ public class AFPTextPainter implements TextPainter { loc = at.transform(loc, null); // font - Font font = makeFont(aci); - nativeTextHandler.setOverrideFont(font); + Font font = getFont(aci); + if (font != null) { + nativeTextHandler.setOverrideFont(font); + } // color TextPaintInfo tpi = (TextPaintInfo) aci.getAttribute( @@ -333,11 +335,8 @@ public class AFPTextPainter implements TextPainter { : Font.WEIGHT_NORMAL; } - private Font makeFont(AttributedCharacterIterator aci) { + private Font getFont(AttributedCharacterIterator aci) { Float fontSize = (Float)aci.getAttribute(TextAttribute.SIZE); - if (fontSize == null) { - fontSize = new Float(10.0f); - } String style = getStyle(aci); int weight = getWeight(aci); -- 2.39.5