LibGfx: Render text presentation emoji as text if we have its glyph
This commit is contained in:
parent
42c272c059
commit
e231f72f61
Notes:
sideshowbarker
2024-07-16 23:55:09 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/e231f72f61 Pull-request: https://github.com/SerenityOS/serenity/pull/17665 Reviewed-by: https://github.com/linusg
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue