Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.
/ jdk20u Public archive

Commit 511ba72

Browse files
author
Jonathan Dowland
committedMay 18, 2023
8304350: Font.getStringBounds calculates wrong width for TextAttribute.TRACKING other than 0.0
Reviewed-by: stuefe Backport-of: 6b9b7d1d921367418f82c2813b272d3447a47595
1 parent 8f816bb commit 511ba72

File tree

1 file changed

+4
-2
lines changed
  • src/java.desktop/share/classes/java/awt

1 file changed

+4
-2
lines changed
 

‎src/java.desktop/share/classes/java/awt/Font.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -2629,8 +2629,10 @@ public Rectangle2D getStringBounds(char [] chars,
26292629
// quick check for simple text, assume GV ok to use if simple
26302630

26312631
boolean simple = values == null ||
2632-
(values.getKerning() == 0 && values.getLigatures() == 0 &&
2633-
values.getBaselineTransform() == null);
2632+
(values.getKerning() == 0
2633+
&& values.getLigatures() == 0
2634+
&& values.getTracking() == 0
2635+
&& values.getBaselineTransform() == null);
26342636
if (simple) {
26352637
simple = ! FontUtilities.isComplexText(chars, beginIndex, limit);
26362638
}

0 commit comments

Comments
 (0)