RFR: 8208377: Soft hyphens render if not using TextLayout
Daniel Gredler
dgredler at openjdk.org
Tue Dec 10 20:13:53 UTC 2024
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.
-------------
Commit messages:
- Always use invisible glyphs for 'default ignorable' chars
Changes: https://git.openjdk.org/jdk/pull/22670/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22670&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8208377
Stats: 348 lines in 5 files changed: 325 ins; 15 del; 8 mod
Patch: https://git.openjdk.org/jdk/pull/22670.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/22670/head:pull/22670
PR: https://git.openjdk.org/jdk/pull/22670
More information about the client-libs-dev
mailing list