mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
Everywhere: Fully qualify font names by including their slope
Fixes typefaces of the same weight but different slopes being incorrectly returned for each other by FontDatabase.
This commit is contained in:
parent
87a149c9a4
commit
96895cd22c
15 changed files with 39 additions and 25 deletions
|
@ -345,7 +345,7 @@ ALWAYS_INLINE int BitmapFont::unicode_view_width(T const& view) const
|
|||
|
||||
String BitmapFont::qualified_name() const
|
||||
{
|
||||
return String::formatted("{} {} {}", family(), presentation_size(), weight());
|
||||
return String::formatted("{} {} {} {}", family(), presentation_size(), weight(), slope());
|
||||
}
|
||||
|
||||
String BitmapFont::variant() const
|
||||
|
@ -366,7 +366,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);
|
||||
m_bold_variant = Gfx::FontDatabase::the().get(family(), presentation_size(), 700, 0);
|
||||
if (!m_bold_variant)
|
||||
m_bold_variant = this;
|
||||
return *m_bold_variant;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue