Some unicode characters are not rendered correctly #5667
Labels
A-Rendering
Drawing game state to the screen
A-Text
Rendering and layout for characters
A-UI
Graphical user interfaces, styles, layouts, and widgets
C-Bug
An unexpected or incorrect behavior
Bevy version
0.8.0
What you did
Rendering zero-width Unicode characters, namely
U+200C
,U+2068
andU+2069
.Example code to reproduce:
You can download the font I used (Fira Sans) from Google Fonts.
Feel free to test this with other fonts though.
What went wrong
The text
"Start\u{200C}\u{2068}\u{2069}End"
renders like this:U+200C
) renders as a thin line. This is wrong, because it's a zero-width, non-printing character.U+2068
andU+2069
characters render like they are unknown to the font. I'm pretty sure that they are supported by the font (see below). They should also not be visible, because they are zero-width control characters.Additional information
The following HTML markup can be used as comparison point:
I included the same font via Google Fonts.
It renders like this:
So all of the zero-width characters are not visible, as expected.
I can't say for certain that the latter two characters are actually supported by the font, the web might fall back to something else to render them correctly.
But the first character definitely seems like a bug.
The text was updated successfully, but these errors were encountered: