RFR: 8208377: Soft hyphens render if not using TextLayout

Daniel Gredler dgredler at openjdk.org
Wed Dec 18 21:02:35 UTC 2024


On Tue, 10 Dec 2024 20:09:09 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 and TTF glyph mappers have been updated, but the macOS glyph mapper has not been updated.

OK yeah, I didn't update the macOS glyph mapper because I don't have a Mac. Let me see if I can wrangle one up. I was hesitant to update the macOS `sun.font.CCharToGlyphMapper` without being able to test or even compile it locally.

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

PR Comment: https://git.openjdk.org/jdk/pull/22670#issuecomment-2552257026


More information about the client-libs-dev mailing list