You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2006/06/05 11:53:23 UTC

svn commit: r411725 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFontManager.java status.xml

Author: jeremias
Date: Mon Jun  5 02:53:22 2006
New Revision: 411725

URL: http://svn.apache.org/viewvc?rev=411725&view=rev
Log:
Bugfix: All fonts names were converted unnecessarily to lower case in RTF output.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFontManager.java
    xmlgraphics/fop/trunk/status.xml

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFontManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFontManager.java?rev=411725&r1=411724&r2=411725&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFontManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFontManager.java Mon Jun  5 02:53:22 2006
@@ -116,16 +116,15 @@
      */
     public int getFontNumber (String family) {
 
-        family = family.toLowerCase ();
-        Object o = fontIndex.get (family);
+        Object o = fontIndex.get(getFontKey(family));
         int retVal;
 
         if (o == null) {
             addFont (family);
 
-            retVal = fontTable.size () - 1;
+            retVal = fontTable.size() - 1;
         } else {
-            retVal = ((Integer) o).intValue ();
+            retVal = ((Integer)o).intValue();
         }
 
         return retVal;
@@ -166,13 +165,17 @@
     // @@ Private methods
     //////////////////////////////////////////////////
 
+    private String getFontKey(String family) {
+        return family.toLowerCase();
+    }
+    
     /**
      * Adds a font to the table.
      *
-     * @param i Identifier of font
+     * @param family Identifier of font
      */
-    private void addFont (String family) {
-        fontIndex.put (family, new Integer (fontTable.size ()));
-        fontTable.addElement (family);
+    private void addFont(String family) {
+        fontIndex.put(getFontKey(family), new Integer(fontTable.size()));
+        fontTable.addElement(family);
     }
 }

Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=411725&r1=411724&r2=411725&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Mon Jun  5 02:53:22 2006
@@ -28,6 +28,9 @@
   <changes>
     <release version="FOP Trunk">
       <action context="Code" dev="JM" type="fix">
+        Bugfix: All fonts names were converted unnecessarily to lower case in RTF output.
+      </action>
+      <action context="Code" dev="JM" type="fix">
         Bugfix: The combination of hyphenation and kerning resulted in slightly ragged 
         right ends for right-aligned and justified text.
       </action>



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org