summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGfx
diff options
context:
space:
mode:
authorthankyouverycool <66646555+thankyouverycool@users.noreply.github.com>2021-11-29 08:43:32 -0500
committerAndreas Kling <kling@serenityos.org>2021-11-30 10:51:51 +0100
commitedf86af4f48c66fc046933e0b92fbb0ba34f84e9 (patch)
treeb326e8e8edcdb0447719be860563ded1534419f1 /Userland/Libraries/LibGfx
parentcdaa179eeb2a66e685c2f28016816c9b966cf615 (diff)
downloadserenity-edf86af4f48c66fc046933e0b92fbb0ba34f84e9.zip
LibGfx+FontEditor: Add helper to determine raw glyph presence
GlyphBitmaps are considered present if they have a width greater than zero. This adds a counterpart method for raw (unmasked) glyphs and makes intent more explicit throughout FontEditor.
Diffstat (limited to 'Userland/Libraries/LibGfx')
-rw-r--r--Userland/Libraries/LibGfx/BitmapFont.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGfx/BitmapFont.h b/Userland/Libraries/LibGfx/BitmapFont.h
index 6adb4858c1..632ddd2f32 100644
--- a/Userland/Libraries/LibGfx/BitmapFont.h
+++ b/Userland/Libraries/LibGfx/BitmapFont.h
@@ -43,6 +43,7 @@ public:
Glyph glyph(u32 code_point) const override;
Glyph raw_glyph(u32 code_point) const;
bool contains_glyph(u32 code_point) const override;
+ bool contains_raw_glyph(u32 code_point) const { return m_glyph_widths[code_point] > 0; }
ALWAYS_INLINE int glyph_or_emoji_width(u32 code_point) const override
{