-
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. Here's info gleaned from such a call :
font=java.awt.Font[family=Helvetica,name=Helvetica,style=plain,size=18]
xAdvances={10.010742,12.005859,10.010742,5.0009766,12.005859,5.0009766,10.010742,12.005859,10.511719}
TextHitInfo hit = new TextHitInfo(curPos[i], true);
float[] cInfo = tl.getCaretInfo(hit);
hit=0 position=89.55176
hit=1 position=0.0
hit=2 position=11.008301
Should hit=0 return 89.55, this has been reported in #4086514. I'm expecting the difference from hit 1 to hit 2 to be the xAdvance of 10.010742.
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=Helvetica,name=Helvetica,style=plain,size=18]
xAdvances={10.010742,12.005859,10.010742,5.0009766,12.005859,5.0009766,10.010742,12.005859,10.511719}
TextHitInfo hit = new TextHitInfo(curPos[i], true);
float[] cInfo = tl.getCaretInfo(hit);
hit=0 position=89.55176
hit=1 position=0.0
hit=2 position=11.008301
Should hit=0 return 89.55, this has been reported in #4086514. I'm expecting the difference from hit 1 to hit 2 to be the xAdvance of 10.010742.
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
-