Hide unicode directional control characters

They shouldn't be looked up in the font and displayed under any
circumstances.
This commit is contained in:
Dav999
2024-01-03 18:55:42 +01:00
committed by Misa Elizabeth Kai
parent 45ec77973b
commit 2003eed2a5
3 changed files with 31 additions and 8 deletions

View File

@@ -1074,6 +1074,12 @@ static int print_char(
{
/* Draws the glyph for a codepoint at x,y.
* Returns the amount of pixels to advance the cursor. */
if (is_directional_character(codepoint) || is_joiner(codepoint))
{
// Some characters should be completely invisible
return 0;
}
const Font* f_glyph;
GlyphInfo* glyph = find_glyphinfo(f, codepoint, &f_glyph);
if (glyph == NULL)