int (final CharSequence text, final int start, final int end, final Graphics g, final int x, final int y, final int fontType, final Color fontColor) { int endX = x; if (start < end) { final FontInfo font = fontForChar(text.charAt(start), fontType); for (int j = start; j < end; j++) { final char c = text.charAt(j); FontInfo newFont = fontForChar(c, fontType); if (font != newFont) { int x1 = drawTablessString(text, start, j, g, x, y, fontType, fontColor); return drawTablessString(text, j, end, g, x1, y, fontType, fontColor); } endX += font.charWidth(c, myEditorComponent); } drawCharsCached(g, text.subSequence(start, end), x, y, fontType, fontColor); } return endX; }