LibGfx: Render text presentation emoji as text if we have its glyph

This commit is contained in:
Timothy Flynn 2023-02-28 08:04:11 -05:00 committed by Linus Groh
parent 42c272c059
commit e231f72f61
Notes: sideshowbarker 2024-07-16 23:55:09 +09:00

View file

@ -1415,7 +1415,7 @@ void Painter::draw_glyph_or_emoji(FloatPoint point, Utf8CodePointIterator& it, F
};
auto font_contains_glyph = font.contains_glyph(code_point);
auto check_for_emoji = Unicode::could_be_start_of_emoji_sequence(it);
auto check_for_emoji = Unicode::could_be_start_of_emoji_sequence(it, font_contains_glyph ? Unicode::SequenceType::EmojiPresentation : Unicode::SequenceType::Any);
// If the font contains the glyph, and we know it's not the start of an emoji, draw a text glyph.
if (font_contains_glyph && !check_for_emoji) {