super.renderSpace(space);
}
private void renderText(AbstractTextArea area, String text, int[] letterAdjust) {
Font font = getFontFromArea(area);
Typeface tf = (Typeface) fontInfo.getFonts().get(font.getFontName());
int initialSize = text.length();
initialSize += initialSize / 2;
StringBuffer sb = new StringBuffer(initialSize);
int textLen = text.length();
if (letterAdjust == null
&& area.getTextLetterSpaceAdjust() == 0
&& area.getTextWordSpaceAdjust() == 0) {
sb.append("(");
for (int i = 0; i < textLen; i++) {
final char c = text.charAt(i);
final char mapped = tf.mapChar(c);
PSGenerator.escapeChar(mapped, sb);
}
sb.append(") t");
} else {
sb.append("(");
int[] offsets = new int[textLen];
for (int i = 0; i < textLen; i++) {
final char c = text.charAt(i);
final char mapped = tf.mapChar(c);
int wordSpace;
if (CharUtilities.isAdjustableSpace(mapped)) {
wordSpace = area.getTextWordSpaceAdjust();
} else {
wordSpace = 0;
}
int cw = tf.getWidth(mapped, font.getFontSize()) / 1000;
int ladj = (letterAdjust != null && i < textLen - 1 ? letterAdjust[i + 1] : 0);
int tls = (i < textLen - 1 ? area.getTextLetterSpaceAdjust() : 0);
offsets[i] = cw + ladj + tls + wordSpace;
PSGenerator.escapeChar(mapped, sb);
}