Conversation
|
This pull request has been marked as stale because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 7 days. Note, that you can always re-open a closed pull request at any time. |
Motivated by poor readability of notifications containing Latin characters from the blocks "Mathematical Alphanumeric Symbols," "Letterlike Symbols," and "Halfwidth and Fullwidth Forms." These characters are sometimes used as a stylistic choice in user display names and channel names on messaging platforms like Discord, but they do not have glyphs assigned to them. Before this change, these codepoints would render as the block fallback, making them unreadable. This change handles these codepoints by mapping them to corresponding Latin codepoints if the glyph lookup fails for the original codepoint. By using the plain Latin glyphs, they are at least rendered in a readable way. One possible alternative is embedding this mapping inside the font data, so that these codepoints map directly to the same glyphs as the plain Latin codepoints. That may be a better solution if possible; I was just more familiar with this part of the code. This is also not a complete list of "styled" codepoints as I call them. These are just the ones I've encountered myself, but there are others for other languages/scripts, and there may also be some Latin ones that I missed. In my opinion this can be extended to handle those in the future, if desired. Signed-off-by: Adam Gausmann <adam@gaussian.dev>
agausmann
force-pushed
the
styled-codepoints
branch
from
September 18, 2026 05:23
daf4676 to
02ebfe6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivated by poor readability of notifications that contain Latin characters from the Unicode blocks "Mathematical Alphanumeric Symbols," "Letterlike Symbols," and "Halfwidth and Fullwidth Forms." These characters are sometimes used as a stylistic choice in user display names and channel names on messaging platforms like Discord, but they do not have glyphs assigned to them.
Before this change, these codepoints would render as the block fallback, making them unreadable. This change handles these codepoints by mapping them to corresponding Latin codepoints if the glyph lookup fails for the original codepoint. By using the plain Latin glyphs, they are at least rendered in a readable way.
One possible alternative is embedding this mapping inside the font data, so that these codepoints map directly to the same glyphs as the plain Latin codepoints. That may be a better solution if possible; I was just more familiar with this part of the code.
This is also not a complete list of "styled" codepoints as I call them. These are just the ones I've encountered myself, but there are others for other languages/scripts, and there may also be some Latin ones that I missed. This system can be extended to handle those in the future, if desired.