mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
LibWeb: Get default fonts via Platform::FontPlugin
Instead of asking Gfx::FontDatabase for the "default font" and the "default fixed-width font", we now proxy those requests out via the Platform::FontPlugin. This will allow Ladybird to use other default fonts as fallback.
This commit is contained in:
parent
07a0d9df30
commit
e72896e35e
10 changed files with 33 additions and 14 deletions
|
@ -16,6 +16,16 @@ FontPluginSerenity::FontPluginSerenity()
|
|||
|
||||
FontPluginSerenity::~FontPluginSerenity() = default;
|
||||
|
||||
Gfx::Font& FontPluginSerenity::default_font()
|
||||
{
|
||||
return Gfx::FontDatabase::default_font();
|
||||
}
|
||||
|
||||
Gfx::Font& FontPluginSerenity::default_fixed_width_font()
|
||||
{
|
||||
return Gfx::FontDatabase::default_fixed_width_font();
|
||||
}
|
||||
|
||||
String FontPluginSerenity::generic_font_name(Web::Platform::GenericFont generic_font)
|
||||
{
|
||||
// FIXME: Replace hard-coded font names with a relevant call to FontDatabase.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue