RFR: 8208377: Soft hyphens render if not using TextLayout
Daniel Gredler
dgredler at openjdk.org
Tue Feb 4 16:25:16 UTC 2025
On Wed, 18 Dec 2024 21:05:16 GMT, Alisen Chung <achung at openjdk.org> wrote:
>> Soft hyphens should never render, regardless of the rendering path used internally.
>>
>> This PR does not expand the categorization of "complex" characters in `FontUtilities` in order to force the use of `TextLayout` rendering code paths (as was discussed in JBS).
>>
>> Instead, it takes the existing (limited) format-category checks in `sun.font.CMap` (a TrueType font helper class), expands it to a more general / complete default-ignorable check (`FontUtilities.isDefaultIgnorable(int)`), and then moves these checks out of `CMap` and up a level into the `CharToGlyphMapper` classes themselves.
>>
>> The Type1 glyph mapper, the TTF glyph mapper, and the macOS glyph mapper have all been updated.
>
> Here's the full error if it helps you debug
>
> java.lang.RuntimeException: stringWidth for char 00ad using font Dialog: 101 != 333
> at FormatCharAdvanceTest.assertEqual(FormatCharAdvanceTest.java:209)
> at FormatCharAdvanceTest.testChar(FormatCharAdvanceTest.java:124)
> at FormatCharAdvanceTest.testChars(FormatCharAdvanceTest.java:94)
> at FormatCharAdvanceTest.main(FormatCharAdvanceTest.java:83)
> at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
> at java.base/java.lang.reflect.Method.invoke(Method.java:567)
> at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
> at java.base/java.lang.Thread.run(Thread.java:1576)
@alisenchung Would you have time to finish your review this week?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22670#issuecomment-2634465184
More information about the client-libs-dev
mailing list