mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:07:46 +00:00
LibWeb+WebContent: Add abstraction layer for generic font families
Instead of hard-coding the names of system fonts to use for the CSS generic fonts (like "sans-serif", "monospace", etc.) we now call out to a Platform::FontPlugin and ask for the generic names.
This commit is contained in:
parent
26544f559c
commit
5c2e3d1637
8 changed files with 153 additions and 8 deletions
|
@ -1,10 +1,11 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2020-2022, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include "EventLoopPluginSerenity.h"
|
||||
#include "FontPluginSerenity.h"
|
||||
#include <LibCore/EventLoop.h>
|
||||
#include <LibCore/LocalServer.h>
|
||||
#include <LibCore/System.h>
|
||||
|
@ -31,6 +32,7 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
Web::Platform::EventLoopPlugin::install(*new WebContent::EventLoopPluginSerenity);
|
||||
Web::Platform::FontPlugin::install(*new WebContent::FontPluginSerenity);
|
||||
|
||||
Web::ImageDecoding::Decoder::initialize(WebView::ImageDecoderClientAdapter::create());
|
||||
Web::WebSockets::WebSocketClientManager::initialize(TRY(WebView::WebSocketClientManagerAdapter::try_create()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue