mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +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
|
@ -15,6 +15,7 @@
|
|||
#include <LibWeb/Painting/PaintableBox.h>
|
||||
#include <LibWeb/Painting/ShadowPainting.h>
|
||||
#include <LibWeb/Painting/StackingContext.h>
|
||||
#include <LibWeb/Platform/FontPlugin.h>
|
||||
|
||||
namespace Web::Painting {
|
||||
|
||||
|
@ -158,7 +159,7 @@ void PaintableBox::paint(PaintContext& context, PaintPhase phase) const
|
|||
paint_inspector_rect(border_rect, Color::Green);
|
||||
paint_inspector_rect(content_rect, Color::Magenta);
|
||||
|
||||
auto& font = Gfx::FontDatabase::default_font();
|
||||
auto& font = Platform::FontPlugin::the().default_font();
|
||||
|
||||
StringBuilder builder;
|
||||
if (layout_box().dom_node())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue