-
Enhancement
-
Resolution: Fixed
-
P5
-
1.3.1, 5.0
-
b28
-
x86
-
linux, windows_nt
Name: anR10225 Date: 07/11/2003
The following three methods of javax.swing.text.Utilities class
which are intensively used during text components layout and
painting could be optimized and made more correct :
. getTabbedTextWidth
. drawTabbedText
. getTabbedTextOffset
Their current implementations calculate the width of a substring
by summing length of its composing characters. This is
. inefficient: calculating the width by a single invocation of
FontMetrics.getCharsWidth(char[], int, int) is 20% - 50%
faster than invocation of FontMetrics.getCharWidth(char)
'length' times.
. incorrect: theoretically a metrics may exist (see bug #4841188)
in which width(char1) + width(char2) != width("" + char1 + char2)
======================================================================
- relates to
-
JDK-4841188 The caret is displayed on the character after the bold Japanese text.
-
- Closed
-