diff options
author | Glenn Adams <gadams@apache.org> | 2012-04-08 21:29:28 +0000 |
---|---|---|
committer | Glenn Adams <gadams@apache.org> | 2012-04-08 21:29:28 +0000 |
commit | 92ca968f8c1bb90a6b6110c589c0484e08323ca4 (patch) | |
tree | 45f1bf19d8cc80512f112b25a2e128d1fe2f0b1a /src/java | |
parent | 65b52fe3a8ca3ba5a798a7fbb5077cf68469b008 (diff) | |
download | xmlgraphics-fop-92ca968f8c1bb90a6b6110c589c0484e08323ca4.tar.gz xmlgraphics-fop-92ca968f8c1bb90a6b6110c589c0484e08323ca4.zip |
Bugzilla #52966: How to use native text with EPSDocumentGraphics2D.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1311103 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/org/apache/fop/fonts/FontInfo.java | 4 | ||||
-rw-r--r-- | src/java/org/apache/fop/render/ps/NativeTextHandler.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/fonts/FontInfo.java b/src/java/org/apache/fop/fonts/FontInfo.java index a38a5b480..cb1827e51 100644 --- a/src/java/org/apache/fop/fonts/FontInfo.java +++ b/src/java/org/apache/fop/fonts/FontInfo.java @@ -474,7 +474,7 @@ public class FontInfo { FontTriplet key = null; String f = null; int newWeight = weight; - if (newWeight <= 400) { + if (newWeight < 400) { while (f == null && newWeight > 100) { newWeight -= 100; key = createFontKey(family, style, newWeight); @@ -486,7 +486,7 @@ public class FontInfo { key = createFontKey(family, style, newWeight); f = getInternalFontKey(key); } - } else if (newWeight == 500) { + } else if (newWeight == 400 || newWeight == 500) { key = createFontKey(family, style, 400); f = getInternalFontKey(key); } else if (newWeight > 500) { diff --git a/src/java/org/apache/fop/render/ps/NativeTextHandler.java b/src/java/org/apache/fop/render/ps/NativeTextHandler.java index 5a39842fb..33adcb8d7 100644 --- a/src/java/org/apache/fop/render/ps/NativeTextHandler.java +++ b/src/java/org/apache/fop/render/ps/NativeTextHandler.java @@ -166,7 +166,7 @@ public class NativeTextHandler implements PSTextHandler { if ((currentFontName != this.font.getFontName()) || (currentFontSize != this.font.getFontSize())) { PSGenerator gen = getPSGenerator(); - gen.writeln(this.font.getFontName() + " " + gen.writeln("/" + this.font.getFontTriplet().getName() + " " + gen.formatDouble(font.getFontSize() / 1000f) + " F"); currentFontName = this.font.getFontName(); currentFontSize = this.font.getFontSize(); |