aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2008-02-19 14:16:08 +0000
committerJeremias Maerki <jeremias@apache.org>2008-02-19 14:16:08 +0000
commit5b06b2c75f10e0be591f878b1d7a533a9b826f7c (patch)
tree83102d550a83f5119f4d54e9272a67b09b773fdf /src/java/org
parentff6ac460f195633039ec5697519a1fa1228a038a (diff)
downloadxmlgraphics-fop-5b06b2c75f10e0be591f878b1d7a533a9b826f7c.tar.gz
xmlgraphics-fop-5b06b2c75f10e0be591f878b1d7a533a9b826f7c.zip
Bugfix: a specified font-weight of 100 could result into a resolved font-weight of 400 even when a font with weight 200 is registered.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@629103 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/fop/fonts/FontInfo.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/fonts/FontInfo.java b/src/java/org/apache/fop/fonts/FontInfo.java
index ab11eb768..218734f15 100644
--- a/src/java/org/apache/fop/fonts/FontInfo.java
+++ b/src/java/org/apache/fop/fonts/FontInfo.java
@@ -383,11 +383,17 @@ public class FontInfo {
String f = null;
int newWeight = weight;
if (newWeight < 400) {
- while (f == null && newWeight > 0) {
+ while (f == null && newWeight > 100) {
newWeight -= 100;
key = createFontKey(family, style, newWeight);
f = getInternalFontKey(key);
}
+ newWeight = weight;
+ while (f == null && newWeight < 400) {
+ newWeight += 100;
+ key = createFontKey(family, style, newWeight);
+ f = getInternalFontKey(key);
+ }
} else if (newWeight == 500) {
key = createFontKey(family, style, 400);
f = getInternalFontKey(key);