From 0af50d4e6cb6538693da07b0ccb1d5c6411115cb Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Mon, 5 Jun 2006 09:53:22 +0000 Subject: [PATCH] Bugfix: All fonts names were converted unnecessarily to lower case in RTF output. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@411725 13f79535-47bb-0310-9956-ffa450edef68 --- .../rtf/rtflib/rtfdoc/RtfFontManager.java | 19 +++++++++++-------- status.xml | 3 +++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFontManager.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFontManager.java index 56bf8ee00..8288fe7cd 100644 --- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFontManager.java +++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFontManager.java @@ -116,16 +116,15 @@ public final class RtfFontManager { */ 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 @@ public final class RtfFontManager { // @@ 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); } } diff --git a/status.xml b/status.xml index 765a0fcc4..86108b625 100644 --- a/status.xml +++ b/status.xml @@ -27,6 +27,9 @@ + + Bugfix: All fonts names were converted unnecessarily to lower case in RTF output. + Bugfix: The combination of hyphenation and kerning resulted in slightly ragged right ends for right-aligned and justified text. -- 2.39.5