Fixed calculation of font size from monitor resolution.

This commit is contained in:
brunoherbelin
2020-05-10 20:24:04 +02:00
parent 1b8e3accea
commit 4303f4ba4d
3 changed files with 27 additions and 2 deletions

View File

@@ -154,8 +154,8 @@ bool UserInterface::Init()
ImGuiToolkit::SetAccentColor(static_cast<ImGuiToolkit::accent_color>(Settings::application.accent_color));
// Load Fonts (using resource manager, NB: a temporary copy of the raw data is necessary)
int base_font_size = int ( Rendering::manager().Height() / 90.f );
Log::Info("Base font size %d", base_font_size);
int base_font_size = int ( Rendering::manager().MonitorHeight() / 90.f );
Log::Info("Base font size %d (%.1f)", base_font_size, Rendering::manager().MonitorHeight());
ImGuiToolkit::SetFont(ImGuiToolkit::FONT_DEFAULT, "Roboto-Regular", base_font_size);
ImGuiToolkit::SetFont(ImGuiToolkit::FONT_BOLD, "Roboto-Bold", base_font_size);
ImGuiToolkit::SetFont(ImGuiToolkit::FONT_ITALIC, "Roboto-Italic", base_font_size);