LibGfx: Pass font width to FontDatabase::get()

Width need to be passed to `FontDatabase::get()` to resolve font name
unambiguously.
This commit is contained in:
Aliaksandr Kalenik 2023-02-04 23:00:34 +03:00 committed by Sam Atkins
commit 1f4106842d
Notes: sideshowbarker 2024-07-17 00:46:13 +09:00
21 changed files with 71 additions and 21 deletions

View file

@ -385,7 +385,7 @@ Font const& Font::bold_variant() const
{
if (m_bold_variant)
return *m_bold_variant;
m_bold_variant = Gfx::FontDatabase::the().get(family(), presentation_size(), 700, 0);
m_bold_variant = Gfx::FontDatabase::the().get(family(), presentation_size(), 700, Gfx::FontWidth::Normal, 0);
if (!m_bold_variant)
m_bold_variant = this;
return *m_bold_variant;