mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
headless-browser: Load fonts via Core::Resource URIs
This commit is contained in:
parent
74707d151b
commit
1af3da39fd
Notes:
sideshowbarker
2024-07-17 06:40:35 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/1af3da39fd Pull-request: https://github.com/SerenityOS/serenity/pull/21302 Reviewed-by: https://github.com/kleinesfilmroellchen Reviewed-by: https://github.com/trflynn89
1 changed files with 2 additions and 2 deletions
|
@ -23,6 +23,7 @@
|
||||||
#include <LibCore/Directory.h>
|
#include <LibCore/Directory.h>
|
||||||
#include <LibCore/EventLoop.h>
|
#include <LibCore/EventLoop.h>
|
||||||
#include <LibCore/File.h>
|
#include <LibCore/File.h>
|
||||||
|
#include <LibCore/ResourceImplementationFile.h>
|
||||||
#include <LibCore/Timer.h>
|
#include <LibCore/Timer.h>
|
||||||
#include <LibDiff/Format.h>
|
#include <LibDiff/Format.h>
|
||||||
#include <LibDiff/Generator.h>
|
#include <LibDiff/Generator.h>
|
||||||
|
@ -426,8 +427,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
Gfx::FontDatabase::set_window_title_font_query("Katica 10 700 0");
|
Gfx::FontDatabase::set_window_title_font_query("Katica 10 700 0");
|
||||||
Gfx::FontDatabase::set_fixed_width_font_query("Csilla 10 400 0");
|
Gfx::FontDatabase::set_fixed_width_font_query("Csilla 10 400 0");
|
||||||
|
|
||||||
auto fonts_path = LexicalPath::join(resources_folder, "fonts"sv);
|
Core::ResourceImplementation::install(make<Core::ResourceImplementationFile>(MUST(String::from_utf8(resources_folder))));
|
||||||
Gfx::FontDatabase::set_default_fonts_lookup_path(fonts_path.string());
|
|
||||||
|
|
||||||
auto theme_path = LexicalPath::join(resources_folder, "themes"sv, "Default.ini"sv);
|
auto theme_path = LexicalPath::join(resources_folder, "themes"sv, "Default.ini"sv);
|
||||||
auto theme = TRY(Gfx::load_system_theme(theme_path.string()));
|
auto theme = TRY(Gfx::load_system_theme(theme_path.string()));
|
||||||
|
|
Loading…
Reference in a new issue