mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-04-25 22:13:13 +00:00
LibGfx: Convert Font APIs to return String instead of DeprecatedString
This commit is contained in:
@@ -826,20 +826,20 @@ void Widget::set_font_family(String const& family)
|
||||
|
||||
void Widget::set_font_size(unsigned size)
|
||||
{
|
||||
set_font(Gfx::FontDatabase::the().get(m_font->family(), size, m_font->weight(), m_font->width(), m_font->slope()));
|
||||
set_font(Gfx::FontDatabase::the().get(m_font->family().to_deprecated_string(), size, m_font->weight(), m_font->width(), m_font->slope()));
|
||||
}
|
||||
|
||||
void Widget::set_font_weight(unsigned weight)
|
||||
{
|
||||
set_font(Gfx::FontDatabase::the().get(m_font->family(), m_font->presentation_size(), weight, m_font->width(), m_font->slope()));
|
||||
set_font(Gfx::FontDatabase::the().get(m_font->family().to_deprecated_string(), m_font->presentation_size(), weight, m_font->width(), m_font->slope()));
|
||||
}
|
||||
|
||||
void Widget::set_font_fixed_width(bool fixed_width)
|
||||
{
|
||||
if (fixed_width)
|
||||
set_font(Gfx::FontDatabase::the().get(Gfx::FontDatabase::the().default_fixed_width_font().family(), m_font->presentation_size(), m_font->weight(), m_font->width(), m_font->slope()));
|
||||
set_font(Gfx::FontDatabase::the().get(Gfx::FontDatabase::the().default_fixed_width_font().family().to_deprecated_string(), m_font->presentation_size(), m_font->weight(), m_font->width(), m_font->slope()));
|
||||
else
|
||||
set_font(Gfx::FontDatabase::the().get(Gfx::FontDatabase::the().default_font().family(), m_font->presentation_size(), m_font->weight(), m_font->width(), m_font->slope()));
|
||||
set_font(Gfx::FontDatabase::the().get(Gfx::FontDatabase::the().default_font().family().to_deprecated_string(), m_font->presentation_size(), m_font->weight(), m_font->width(), m_font->slope()));
|
||||
}
|
||||
|
||||
bool Widget::is_font_fixed_width()
|
||||
@@ -1272,7 +1272,7 @@ void Widget::add_spacer()
|
||||
|
||||
String Widget::font_family() const
|
||||
{
|
||||
return String::from_deprecated_string(m_font->family()).release_value_but_fixme_should_propagate_errors();
|
||||
return m_font->family();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user