aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorAdrian Cumiskey <acumiskey@apache.org>2008-11-18 09:48:38 +0000
committerAdrian Cumiskey <acumiskey@apache.org>2008-11-18 09:48:38 +0000
commit91a223f9a2d6a9a502b293653b39e4d506a245da (patch)
treedb8efb8e342e5d4af57d6e83f0153ed08a86b63c /src/java/org
parent016ddc8aa591fde0adcaef76158f3f5ebcf6590a (diff)
downloadxmlgraphics-fop-91a223f9a2d6a9a502b293653b39e4d506a245da.tar.gz
xmlgraphics-fop-91a223f9a2d6a9a502b293653b39e4d506a245da.zip
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
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/fop/afp/svg/AFPTextPainter.java13
1 files 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);