<Swing Dev> [9] Review Request: 8015085 [macosx] Label shortening via " ... " broken when String contains combining diaeresis

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Mon Jan 12 15:46:18 UTC 2015


Hello.
Please review a fix for jdk 9.
Description:
The problem is that we consider the string which contains a combining 
diaeresis as string which needs TextLayout. In such case 
SwingUtilities2.clipString will use LineBreakMeasurer to calculate the 
characters inside some advance. But by default LineBreakMeasurer will 
use LineSeparator instead of CharSeparator, and this causes a difference 
against a normal case where we use per character 
calculation(SwingUtilities2 lines 453 - 461).
Note that in the test I paint two strings one with combining 
diaeresis/one without, and expect that they will be rendered in the same 
way.

Bug: https://bugs.openjdk.java.net/browse/JDK-8015085
Webrev can be found at: http://cr.openjdk.java.net/~serb/8015085/webrev.01

-- 
Best regards, Sergey.




More information about the swing-dev mailing list