mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +00:00
LibGfx+LibGUI+Clients: Make fonts findable by their qualified name
The qualified name of a font is "<Family> <Size> <Weight>". You can get the QN of a Font via the Font::qualified_name() API, and you can get any system font by QN from the GUI::FontDatabase. :^)
This commit is contained in:
parent
260b52215c
commit
9d347352a1
8 changed files with 57 additions and 61 deletions
|
@ -363,4 +363,9 @@ void Font::set_family_fonts()
|
|||
}
|
||||
}
|
||||
|
||||
String Font::qualified_name() const
|
||||
{
|
||||
return String::formatted("{} {} {}", family(), presentation_size(), weight());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue