diff options
-rw-r--r-- | Base/etc/WindowServer.ini | 4 | ||||
-rw-r--r-- | Userland/Services/WindowServer/ClientConnection.cpp | 4 | ||||
-rw-r--r-- | Userland/Services/WindowServer/main.cpp | 7 |
3 files changed, 13 insertions, 2 deletions
diff --git a/Base/etc/WindowServer.ini b/Base/etc/WindowServer.ini index 0b74dad559..4c83ec6273 100644 --- a/Base/etc/WindowServer.ini +++ b/Base/etc/WindowServer.ini @@ -3,6 +3,10 @@ Width=1024 Height=768 ScaleFactor=1 +[Fonts] +Default=Katica 10 400 +FixedWidth=Csilla 10 400 + [Theme] Name=Default diff --git a/Userland/Services/WindowServer/ClientConnection.cpp b/Userland/Services/WindowServer/ClientConnection.cpp index 5fda635acb..7eaed9ead4 100644 --- a/Userland/Services/WindowServer/ClientConnection.cpp +++ b/Userland/Services/WindowServer/ClientConnection.cpp @@ -724,6 +724,10 @@ Messages::WindowServer::SetSystemFontsResponse ClientConnection::set_system_font }); WindowManager::the().invalidate_after_theme_or_font_change(); + + auto wm_config = Core::ConfigFile::open("/etc/WindowServer.ini"); + wm_config->write_entry("Fonts", "Default", default_font_query); + wm_config->write_entry("Fonts", "FixedWidth", fixed_width_font_query); return true; } diff --git a/Userland/Services/WindowServer/main.cpp b/Userland/Services/WindowServer/main.cpp index 8d61225218..df2e8dabc2 100644 --- a/Userland/Services/WindowServer/main.cpp +++ b/Userland/Services/WindowServer/main.cpp @@ -62,8 +62,11 @@ int main(int, char**) Gfx::set_system_theme(theme); auto palette = Gfx::PaletteImpl::create_with_anonymous_buffer(theme); - Gfx::FontDatabase::set_default_font_query("Katica 10 400"); - Gfx::FontDatabase::set_fixed_width_font_query("Csilla 10 400"); + auto default_font_query = wm_config->read_entry("Fonts", "Default", "Katica 10 400"); + auto fixed_width_font_query = wm_config->read_entry("Fonts", "FixedWidth", "Csilla 10 400"); + + Gfx::FontDatabase::set_default_font_query(default_font_query); + Gfx::FontDatabase::set_fixed_width_font_query(fixed_width_font_query); WindowServer::EventLoop loop; |