diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-06-24 13:26:39 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-06-24 13:26:39 +0100 |
commit | dfc095bd900b37fb7e1ddb25fd2a85bf1839e41c (patch) | |
tree | 9ff423914f15642e120b905396d9baa14f6d90ea | |
parent | 80cc3266580e9fbd77f07b094f6248326cf2cee3 (diff) | |
download | netsurf-dfc095bd900b37fb7e1ddb25fd2a85bf1839e41c.tar.gz netsurf-dfc095bd900b37fb7e1ddb25fd2a85bf1839e41c.tar.bz2 |
Display U+FFFD for characters > U+FFFF.
-rw-r--r-- | framebuffer/font_internal.c | 6 |
1 files changed, 6 insertions, 0 deletions
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]; |