xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r629103 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontInfo.java
Date Tue, 19 Feb 2008 14:16:15 GMT
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: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message