mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +00:00
LibGFX: Move default_xxx_font() methods from Font to FontDatabase
When we have an abstract font class it makes no sense to keep these methods in the Font class.
This commit is contained in:
parent
1a072a61fb
commit
b4d1390714
48 changed files with 152 additions and 115 deletions
|
@ -133,7 +133,7 @@ TerminalWidget::TerminalWidget(int ptm_fd, bool automatic_size_policy, RefPtr<Co
|
|||
|
||||
auto font_entry = m_config->read_entry("Text", "Font", "default");
|
||||
if (font_entry == "default")
|
||||
set_font(Gfx::Font::default_fixed_width_font());
|
||||
set_font(Gfx::FontDatabase::default_fixed_width_font());
|
||||
else
|
||||
set_font(Gfx::FontDatabase::the().get_by_name(font_entry));
|
||||
|
||||
|
@ -1022,7 +1022,7 @@ void TerminalWidget::did_change_font()
|
|||
m_line_height = font().glyph_height() + m_line_spacing;
|
||||
|
||||
// TODO: try to find a bold version of the new font (e.g. CsillaThin7x10 -> CsillaBold7x10)
|
||||
const Gfx::Font& bold_font = Gfx::Font::default_bold_fixed_width_font();
|
||||
const Gfx::Font& bold_font = Gfx::FontDatabase::default_bold_fixed_width_font();
|
||||
|
||||
if (bold_font.glyph_height() == font().glyph_height() && bold_font.glyph_width(' ') == font().glyph_width(' '))
|
||||
m_bold_font = &bold_font;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue