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:
Andreas Kling 2020-10-25 19:28:06 +01:00
commit 9d347352a1
Notes: sideshowbarker 2024-07-19 01:43:34 +09:00
8 changed files with 57 additions and 61 deletions

View file

@ -363,4 +363,9 @@ void Font::set_family_fonts()
}
}
String Font::qualified_name() const
{
return String::formatted("{} {} {}", family(), presentation_size(), weight());
}
}