1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:57:34 +00:00

FontEditor: Display something for emoji glyphs

This commit makes FontEditor displaying emojis in GlyphMapWidget. They
are not editable, what is marked by red background of a glyph.

Additionally, a proper information is displayed in statusbar.

Fixes #10900.
This commit is contained in:
Maciej 2021-11-14 13:27:17 +01:00 committed by Andreas Kling
parent 923bec28b7
commit 4d4764e0fb
2 changed files with 9 additions and 0 deletions

View file

@ -34,6 +34,7 @@
#include <LibGUI/ToolbarContainer.h>
#include <LibGUI/Window.h>
#include <LibGfx/BitmapFont.h>
#include <LibGfx/Emoji.h>
#include <LibGfx/FontStyleMapping.h>
#include <LibGfx/Palette.h>
#include <LibGfx/TextDirection.h>
@ -742,6 +743,8 @@ void FontEditorWidget::update_statusbar()
if (m_edited_font->contains_raw_glyph(glyph))
builder.appendff(" [{}x{}]", m_edited_font->raw_glyph_width(glyph), m_edited_font->glyph_height());
else if (Gfx::Emoji::emoji_for_code_point(glyph))
builder.appendff(" [emoji]");
m_statusbar->set_text(builder.to_string());
}