Ver código fonte

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
tags/fop-0_93
Jeremias Maerki 18 anos atrás
pai
commit
0af50d4e6c

+ 11
- 8
src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFontManager.java Ver arquivo

@@ -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);
}
}

+ 3
- 0
status.xml Ver arquivo

@@ -27,6 +27,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.

Carregando…
Cancelar
Salvar