summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGfx
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-04-18 21:12:52 +0300
committerAndreas Kling <kling@serenityos.org>2021-04-18 22:10:25 +0200
commit18ae37439a4fdd65d98b94c75c5d64480a827289 (patch)
tree308d043fb13d07776308556f77cfd68f19f33a3a /Userland/Libraries/LibGfx
parent08d1b16a8d1e43014f8252b74e5b3605cdb310f9 (diff)
downloadserenity-18ae37439a4fdd65d98b94c75c5d64480a827289.zip
FontEditor+LibGfx: Allow user to specify if a specific glyph is present
This replaces the glyph width spinbox in the font editor with a checkbox when editing fixed width fonts that indicates if the currently selected character's glyph is present in the edited font (For variable width fonts a non zero width implies presence) This commit also changes the background color of glyphs in the glyph map based on the presence of each specific glyph in the font.
Diffstat (limited to 'Userland/Libraries/LibGfx')
-rw-r--r--Userland/Libraries/LibGfx/BitmapFont.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGfx/BitmapFont.h b/Userland/Libraries/LibGfx/BitmapFont.h
index 4fab8edc27..67f7354e9c 100644
--- a/Userland/Libraries/LibGfx/BitmapFont.h
+++ b/Userland/Libraries/LibGfx/BitmapFont.h
@@ -70,6 +70,8 @@ public:
u8 glyph_height() const { return m_glyph_height; }
int x_height() const { return m_x_height; }
+ u8 raw_glyph_width(size_t ch) const { return m_glyph_widths[ch]; }
+
u8 min_glyph_width() const { return m_min_glyph_width; }
u8 max_glyph_width() const { return m_max_glyph_width; }
u8 glyph_fixed_width() const { return m_glyph_width; }