summaryrefslogtreecommitdiff
path: root/LibGUI/GFontDatabase.h
diff options
context:
space:
mode:
Diffstat (limited to 'LibGUI/GFontDatabase.h')
-rw-r--r--LibGUI/GFontDatabase.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/LibGUI/GFontDatabase.h b/LibGUI/GFontDatabase.h
index 5cc37cc243..e1de0baec5 100644
--- a/LibGUI/GFontDatabase.h
+++ b/LibGUI/GFontDatabase.h
@@ -6,6 +6,12 @@
class Font;
+struct Metadata {
+ String path;
+ bool is_fixed_width;
+ int glyph_height;
+};
+
class GFontDatabase {
public:
static GFontDatabase& the();
@@ -14,15 +20,13 @@ public:
void for_each_font(Function<void(const String&)>);
void for_each_fixed_width_font(Function<void(const String&)>);
+ Metadata get_metadata_by_name(const String& name) const {
+ return m_name_to_metadata.get(name);
+ };
+
private:
GFontDatabase();
~GFontDatabase();
- struct Metadata {
- String path;
- bool is_fixed_width;
- int glyph_height;
- };
-
HashMap<String, Metadata> m_name_to_metadata;
};