From: Adrian Cumiskey Date: Tue, 18 Nov 2008 09:48:38 +0000 (+0000) Subject: Default 10pt font fallback removed. X-Git-Tag: fop-1_0~376^2~14 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=91a223f9a2d6a9a502b293653b39e4d506a245da;p=xmlgraphics-fop.git 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 --- 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);