pietsch 2003/03/02 05:04:16 Modified: src/org/apache/fop/fo Tag: fop-0_20_2-maintain FOText.java Log: Fixed destructive data mangling while preparing text for small-caps font variation. The fix is simplisitc and can cause small caps text to be expensive in terms of memory consumption and processing time. PR: 1171 Revision Changes Path No revision No revision 1.24.2.8 +6 -3 xml-fop/src/org/apache/fop/fo/FOText.java Index: FOText.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FOText.java,v retrieving revision 1.24.2.7 retrieving revision 1.24.2.8 diff -u -r1.24.2.7 -r1.24.2.8 --- FOText.java 25 Feb 2003 12:56:54 -0000 1.24.2.7 +++ FOText.java 2 Mar 2003 13:04:15 -0000 1.24.2.8 @@ -209,6 +209,7 @@ // parse text for upper/lower case and call addRealText char c; + char newdata[] = new char[end]; boolean isLowerCase; int caseStart; FontState fontStateToUse; @@ -221,7 +222,9 @@ == (java.lang.Character.isLetter(c) && java.lang.Character.isLowerCase(c))) { if (isLowerCase) { - data[i] = java.lang.Character.toUpperCase(c); + newdata[i] = java.lang.Character.toUpperCase(c); + } else { + newdata[i] = c; } i++; if (i == end) @@ -235,7 +238,7 @@ } int index = addRealText(ba, fontStateToUse, red, green, blue, wrapOption, ls, whiteSpaceCollapse, - data, caseStart, i, textState, + newdata, caseStart, i, textState, vAlign); if (index != -1) { return index;
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]