mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibGfx: Add new methods to Font to avoid embedded values in FontEditor
This commit is contained in:
parent
6f2837cb13
commit
e68a08ad7c
Notes:
sideshowbarker
2024-07-19 06:49:32 +09:00
Author: https://github.com/asliturk Commit: https://github.com/SerenityOS/serenity/commit/e68a08ad7cb Pull-request: https://github.com/SerenityOS/serenity/pull/2164
1 changed files with 5 additions and 0 deletions
|
@ -91,6 +91,8 @@ public:
|
|||
u8 glyph_height() const { return m_glyph_height; }
|
||||
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; }
|
||||
|
||||
int width(const StringView&) const;
|
||||
int width(const Utf8View&) const;
|
||||
|
||||
|
@ -109,12 +111,15 @@ public:
|
|||
m_glyph_widths[(u8)ch] = width;
|
||||
}
|
||||
|
||||
int glyph_count() { return m_glyph_count; }
|
||||
|
||||
private:
|
||||
Font(const StringView& name, unsigned* rows, u8* widths, bool is_fixed_width, u8 glyph_width, u8 glyph_height, u8 glyph_spacing);
|
||||
|
||||
static RefPtr<Font> load_from_memory(const u8*);
|
||||
|
||||
String m_name;
|
||||
size_t m_glyph_count { 256 };
|
||||
|
||||
unsigned* m_rows { nullptr };
|
||||
u8* m_glyph_widths { nullptr };
|
||||
|
|
Loading…
Reference in a new issue