mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:27:46 +00:00
Add a bold variant of Katica and make that the system's default bold font.
..and do some minor tweaks to the font rendering code.
This commit is contained in:
parent
66a5ddd94a
commit
31d6b640eb
5 changed files with 10 additions and 5 deletions
|
@ -44,7 +44,7 @@ Font& Font::default_fixed_width_font()
|
|||
Font& Font::default_bold_font()
|
||||
{
|
||||
static Font* s_default_bold_font;
|
||||
static const char* default_bold_font_path = "/res/fonts/CsillaBold7x10.font";
|
||||
static const char* default_bold_font_path = "/res/fonts/KaticaBold10.font";
|
||||
if (!s_default_bold_font) {
|
||||
s_default_bold_font = Font::load_from_file(default_bold_font_path).leak_ref();
|
||||
ASSERT(s_default_bold_font);
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
|
||||
~Font();
|
||||
|
||||
GlyphBitmap glyph_bitmap(char ch) const { return GlyphBitmap(&m_rows[(byte)ch * m_glyph_height], { m_glyph_width, m_glyph_height }); }
|
||||
GlyphBitmap glyph_bitmap(char ch) const { return GlyphBitmap(&m_rows[(byte)ch * m_glyph_height], { glyph_width(ch), m_glyph_height }); }
|
||||
|
||||
byte glyph_width(char ch) const { return m_fixed_width ? m_glyph_width : m_glyph_widths[(byte)ch]; }
|
||||
byte glyph_height() const { return m_glyph_height; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue