1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 12:08:14 +00:00

LibDraw: Add Font::default_bold_fixed_width_font()

We need a way to get a bold version of the default fixed-width font.
This commit is contained in:
Andreas Kling 2019-08-04 08:14:53 +02:00
parent 116d551f82
commit 7d08116a6d
2 changed files with 12 additions and 0 deletions

View file

@ -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;

View file

@ -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;