LibGfx: draw_glyph_or_emoji fix check for available glyph

This would cause question marks to be rendered when a ttf with fewer
glyphs than the value of the code_point was used.
This commit is contained in:
Stephan Unverwerth 2021-01-03 19:24:59 +01:00 committed by Andreas Kling
commit 3b67b55c84
Notes: sideshowbarker 2024-07-18 22:17:36 +09:00
4 changed files with 5 additions and 3 deletions

View file

@ -110,6 +110,7 @@ public:
virtual u16 weight() const = 0;
virtual Glyph glyph(u32 code_point) const = 0;
virtual bool contains_glyph(u32 code_point) const = 0;
virtual u8 glyph_width(size_t ch) const = 0;
virtual int glyph_or_emoji_width(u32 code_point) const = 0;