mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +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:
parent
116d551f82
commit
7d08116a6d
2 changed files with 12 additions and 0 deletions
|
@ -42,6 +42,17 @@ Font& Font::default_fixed_width_font()
|
||||||
return *s_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()
|
Font& Font::default_bold_font()
|
||||||
{
|
{
|
||||||
static Font* s_default_bold_font;
|
static Font* s_default_bold_font;
|
||||||
|
|
|
@ -46,6 +46,7 @@ public:
|
||||||
static Font& default_bold_font();
|
static Font& default_bold_font();
|
||||||
|
|
||||||
static Font& default_fixed_width_font();
|
static Font& default_fixed_width_font();
|
||||||
|
static Font& default_bold_fixed_width_font();
|
||||||
|
|
||||||
RefPtr<Font> clone() const;
|
RefPtr<Font> clone() const;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue