From 42baaff9b0e7b1e0f3715033a7ee89c9064a1693 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 28 Apr 2026 02:56:13 +0200 Subject: [PATCH] Use system default font --- depends/mglpp | 2 +- src/Theme.cpp | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/depends/mglpp b/depends/mglpp index 41d2ad6..a12ffa5 160000 --- a/depends/mglpp +++ b/depends/mglpp @@ -1 +1 @@ -Subproject commit 41d2ad6c42bec09cc4018feb2056f0be828da482 +Subproject commit a12ffa531d6ccbf726991bd4fe5eb05b37416331 diff --git a/src/Theme.cpp b/src/Theme.cpp index 7df731e..76dedb9 100644 --- a/src/Theme.cpp +++ b/src/Theme.cpp @@ -2,6 +2,7 @@ #include "../include/Config.hpp" #include "../include/GsrInfo.hpp" +#include #include #include @@ -40,10 +41,14 @@ namespace gsr { window_width = window_size.x; window_height = window_size.y; - theme->title_font_desc = std::string("Noto Sans Bold ") + std::to_string(std::round(std::max(16.0f, window_size.y * 0.019f)/1.8)); - theme->top_bar_font_desc = std::string("Noto Sans Bold ") + std::to_string(std::round(std::max(23.0f, window_size.y * 0.03f)/1.8)); - theme->body_font_desc = std::string("Noto Sans ") + std::to_string(std::round(std::max(13.0f, window_size.y * 0.015f)/1.8)); - theme->camera_setup_font_desc = "Noto Sans 14"; + std::string default_font_name = mgl::Text::get_default_font_name(); + if(default_font_name.empty()) + default_font_name = "Sans"; + + theme->title_font_desc = default_font_name + std::string(" Bold ") + std::to_string(std::round(std::max(16.0f, window_size.y * 0.019f)/1.8)); + theme->top_bar_font_desc = default_font_name + std::string(" Bold ") + std::to_string(std::round(std::max(23.0f, window_size.y * 0.03f)/1.8)); + theme->body_font_desc = default_font_name + std::string(" ") + std::to_string(std::round(std::max(13.0f, window_size.y * 0.015f)/1.8)); + theme->camera_setup_font_desc = default_font_name + " 14"; return true; }