Author: jeremias
Date: Tue Feb 19 06:16:08 2008
New Revision: 629103

URL: http://svn.apache.org/viewvc?rev=629103&view=rev
Log:
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.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontInfo.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontInfo.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontInfo.java?rev=629103&r1=629102&r2=629103&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontInfo.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontInfo.java Tue Feb 
19 06:16:08 2008
@@ -383,8 +383,14 @@
         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);
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to