diff options
-rw-r--r-- | Libraries/LibDraw/Font.cpp | 11 | ||||
-rw-r--r-- | Libraries/LibDraw/Font.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Libraries/LibDraw/Font.cpp b/Libraries/LibDraw/Font.cpp index b46495ad3b..755400ab32 100644 --- a/Libraries/LibDraw/Font.cpp +++ b/Libraries/LibDraw/Font.cpp @@ -42,6 +42,17 @@ Font& Font::default_fixed_width_font() return *s_default_fixed_width_font; } +Font& Font::default_bold_fixed_width_font() +{ + static Font* font; + static const char* default_bold_fixed_width_font_path = "/res/fonts/CsillaBold7x10.font"; + if (!font) { + font = Font::load_from_file(default_bold_fixed_width_font_path).leak_ref(); + ASSERT(font); + } + return *font; +} + Font& Font::default_bold_font() { static Font* s_default_bold_font; diff --git a/Libraries/LibDraw/Font.h b/Libraries/LibDraw/Font.h index 3bda812159..bdc2e05846 100644 --- a/Libraries/LibDraw/Font.h +++ b/Libraries/LibDraw/Font.h @@ -46,6 +46,7 @@ public: static Font& default_bold_font(); static Font& default_fixed_width_font(); + static Font& default_bold_fixed_width_font(); RefPtr<Font> clone() const; |