From dfc095bd900b37fb7e1ddb25fd2a85bf1839e41c Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 24 Jun 2014 13:26:39 +0100 Subject: Display U+FFFD for characters > U+FFFF. --- framebuffer/font_internal.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'framebuffer') diff --git a/framebuffer/font_internal.c b/framebuffer/font_internal.c index e514b12d9..4edb4ee4c 100644 --- a/framebuffer/font_internal.c +++ b/framebuffer/font_internal.c @@ -221,6 +221,12 @@ fb_get_glyph(uint32_t ucs4, enum fb_font_style style) unsigned int offset; uint16_t g_offset; + /* Internal font has no glyphs beyond U+FFFF and there isn't + * space to render a >4 digit codepoint; just show replacement + * character. */ + if (ucs4 > 0xffff) + ucs4 = 0xfffd; + switch (style) { case FB_BOLD_ITALIC: section = fb_bold_italic_section_table[ucs4 / 256]; -- cgit v1.2.3