RFR: 8208377: Soft hyphens render if not using TextLayout [v3]
Phil Race
prr at openjdk.org
Tue Dec 24 19:50:37 UTC 2024
On Fri, 20 Dec 2024 00:17:54 GMT, Daniel Gredler <dgredler 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.
>
> Daniel Gredler has updated the pull request incrementally with one additional commit since the last revision:
>
> Add more info about test fonts and default-ignorable chars
src/java.desktop/share/classes/sun/font/FontUtilities.java line 366:
> 364: case 0x20: return (charCode >= 0x200B && charCode <= 0x200F) ||
> 365: (charCode >= 0x202A && charCode <= 0x202E) ||
> 366: (charCode >= 0x2060 && charCode <= 0x206F);
I just noticed this really old open bug
https://bugs.openjdk.org/browse/JDK-6562489 : Font-Renderer should ignore invisible characters \u2062 and \u2063
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22670#discussion_r1896940049
More information about the client-libs-dev
mailing list