RFR: 8165943: LineBreakMeasurer does not measure correctly if TextAttribute.TRACKING is set.

azul-jf duke at openjdk.org
Mon Nov 21 15:05:57 UTC 2022


On Sun, 20 Nov 2022 03:39:56 GMT, Phil Race <prr at openjdk.org> wrote:

>> This is a fix for LineBreakMeasurer. It takes into account the TextAttribute.TRACKING value (not eq 0) while calculating the line breaks.
>> 
>> Tested on Linux x64, Windows x64, macOS x64 with the reproducer (LineBreakSample.java) attached to JDK-8165943 and the following group of tests:
>> `$JTREG_HOME/bin/jtreg -jdk:$BUILD_HOME ./test/jdk/java/awt/font`
>
> I haven't had time to look at this. Maybe I can look at it some time in the 1st week of December. Ping me then.

Hi @prrace, this came to our attention as a customer issue. The reproducer we used was the one from JDK-8165943. 

As a reminder of the issue and an illustration of the desired outcome, here are some screen captures. 

Existing code, TRACKING = 0.0:

![image](https://user-images.githubusercontent.com/68303684/203083698-a557b968-2e68-48b5-8313-09f7458b91c5.png)

Existing code, TRACKING = 0.1:

![image](https://user-images.githubusercontent.com/68303684/203084245-f32ae45f-0d1b-4419-8d7d-274f23d14155.png)

Submitted code, TRACKING = 0.1:

![image](https://user-images.githubusercontent.com/68303684/203084873-c31da8e2-7044-4737-a15d-2738f90e4929.png)

-------------

PR: https://git.openjdk.org/jdk/pull/10289



More information about the client-libs-dev mailing list