RFR: 8350203: [macos] Newlines and tabs are not ignored when drawing text to a Graphics2D object [v3]

Harshitha Onkar honkar at openjdk.org
Mon May 12 19:42:55 UTC 2025


On Mon, 12 May 2025 19:34:16 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>>> There seems to be similar issue on Windows and Linux where the hexcode - 0x2028 (line separator) and 0x2029 (paragraph separator) are shown with a non-zero advance - `/java/awt/font/TextLayout/TestControls.java`
>> 
>> Are these characters new? I can't remember there were any characters with non-zero width on Linux and Windows. I ran this test (or its previous version) on each HarfBuzz update.
>> 
>> No, they were these characters are part of the existing test.
>> 
>> I cannot reproduce this problem with 21.0.6. Nor is it reproducible with 21.0.7, the latest GA version of Java 21.
>> 
>> Yet I the same picture as you attached on Windows on a recent build of mainline.
>> 
>> If that's the case, it seems to be regression rather than an existing issue.
>
> I also submitted [JDK-8356812](https://bugs.openjdk.org/browse/JDK-8356812): *Create an automated version of TextLayout/TestControls*.
> 
> Verifying that the widths of all control characters is zero can be automated; the manual version can exist along-side to ensure all the characters are rendered as expected.

@aivanov-jdk Thanks for testing on older versions of JDK. I'm checking if this issue was caused by  harfbuzz upgrade or recent code changes to JDK.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23665#discussion_r2085328760


More information about the client-libs-dev mailing list