From ae59d8a72814d7c0552d93461b321798d075875c Mon Sep 17 00:00:00 2001 From: thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> Date: Thu, 9 Sep 2021 07:47:48 -0400 Subject: [PATCH] LibGfx: Paint replacement character, 0xFFFD, for unknown glyphs Note: most systems now use a font's .notdef character for unknown glyphs (commonly the tofu box) and reserve 0xFFFD for encoding errors. Until Serenity supports tofu, 0xFFFD is a preferable, if deprecated, alternative to '?' to reduce ambiguity. --- Userland/Libraries/LibGfx/Painter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibGfx/Painter.cpp b/Userland/Libraries/LibGfx/Painter.cpp index 29bd782f39..4b8a9f54bc 100644 --- a/Userland/Libraries/LibGfx/Painter.cpp +++ b/Userland/Libraries/LibGfx/Painter.cpp @@ -1216,7 +1216,7 @@ void Painter::draw_glyph_or_emoji(IntPoint const& point, u32 code_point, Font co auto* emoji = Emoji::emoji_for_code_point(code_point); if (emoji == nullptr) { dbgln_if(EMOJI_DEBUG, "Failed to find an emoji for code_point {}", code_point); - draw_glyph(point, '?', font, color); + draw_glyph(point, 0xFFFD, font, color); return; }