-
Bug
-
Resolution: Fixed
-
P2
-
1.2.0
-
1.2beta4
-
sparc
-
solaris_2.6
-
Verified
TextLayout.getCaretInfo(hit) is not returning the correct xAdvances that are listed when doing a TextLayout.toString. This bug is similiar to #4087651, but the font type is different and the mannerisms are different. Here's info gleaned from the TextLayout.toString() call :
font=java.awt.Font[family=Courier New Italic,name=Courier New Italic,style=plain,size=18]
glyphCount=18
xAdvances={10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758}
TextHitInfo hit = new TextHitInfo(curPos[i], true);
float[] cInfo = tl.getCaretInfo(hit);
hit=0 position=250.52
hit=1 position=198.65
hit=2 position=208.53
I'm expecting hit 1 to equal 0 and hit 2 to be the xAdvance of 10.801758.
Source code has been attached.
java full version "thanh:10/20/97-22:58"
setenv JAVA_FONTS /usr/openwin/lib/X11/fonts/TrueType
font=java.awt.Font[family=Courier New Italic,name=Courier New Italic,style=plain,size=18]
glyphCount=18
xAdvances={10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758,10.801758}
TextHitInfo hit = new TextHitInfo(curPos[i], true);
float[] cInfo = tl.getCaretInfo(hit);
hit=0 position=250.52
hit=1 position=198.65
hit=2 position=208.53
I'm expecting hit 1 to equal 0 and hit 2 to be the xAdvance of 10.801758.
Source code has been attached.
java full version "thanh:10/20/97-22:58"
setenv JAVA_FONTS /usr/openwin/lib/X11/fonts/TrueType
- relates to
-
JDK-4130434 The Measurement of Text
-
- Closed
-