mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
LibGfx+WebContent: Load resource://fonts after FontDatabase construction
This is a preparation for upcoming changes where Gfx::Typeface will depend on `FontDatabase::should_force_fontconfig()`, so we will no longer be able to construct typefaces from FontDatabase constructor because of circular dependency.
This commit is contained in:
parent
db74244fb2
commit
99f64139d0
Notes:
github-actions[bot]
2024-09-05 17:22:57 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/99f64139d07 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1278 Reviewed-by: https://github.com/trflynn89
2 changed files with 2 additions and 1 deletions
|
@ -136,6 +136,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
Gfx::FontDatabase::the().set_force_fontconfig(true);
|
||||
}
|
||||
|
||||
Gfx::FontDatabase::the().load_all_fonts_from_uri("resource://fonts"sv);
|
||||
|
||||
// Layout test mode implies internals object is exposed and the Skia CPU backend is used
|
||||
if (is_layout_test_mode) {
|
||||
expose_internals_object = true;
|
||||
|
|
|
@ -78,7 +78,6 @@ void FontDatabase::load_all_fonts_from_uri(StringView uri)
|
|||
FontDatabase::FontDatabase()
|
||||
: m_private(make<Private>())
|
||||
{
|
||||
load_all_fonts_from_uri("resource://fonts"sv);
|
||||
}
|
||||
|
||||
RefPtr<Gfx::Font> FontDatabase::get(FlyString const& family, float point_size, unsigned weight, unsigned width, unsigned slope)
|
||||
|
|
Loading…
Reference in a new issue