diff --git a/ImGuiToolkit.cpp b/ImGuiToolkit.cpp index c65d738..18650f7 100644 --- a/ImGuiToolkit.cpp +++ b/ImGuiToolkit.cpp @@ -705,8 +705,8 @@ void ImGuiToolkit::SetFont(ImGuiToolkit::font_style style, const std::string &tt ImFontConfig font_config; fontname.copy(font_config.Name, 40); font_config.FontDataOwnedByAtlas = false; // data will be copied in font atlas - font_config.OversampleH = 7; - font_config.OversampleV = 3; + font_config.OversampleH = 5; + font_config.OversampleV = 5; // read font in Resource manager size_t data_size = 0; diff --git a/RenderingManager.cpp b/RenderingManager.cpp index 8d0f1dd..00b7f4f 100644 --- a/RenderingManager.cpp +++ b/RenderingManager.cpp @@ -376,6 +376,7 @@ float Rendering::MonitorHeight() GLFWmonitor *monitor = glfwGetWindowMonitor (main_window_); if (!monitor) monitor = glfwGetPrimaryMonitor (); + // TODO : detect in which monitor is the main window and return the height for that monitor int xpos, ypos, width, height; glfwGetMonitorWorkarea(monitor, &xpos, &ypos, &width, &height); diff --git a/UserInterfaceManager.cpp b/UserInterfaceManager.cpp index a47776d..30eb6f0 100644 --- a/UserInterfaceManager.cpp +++ b/UserInterfaceManager.cpp @@ -153,8 +153,9 @@ bool UserInterface::Init() // Setup Dear ImGui style ImGuiToolkit::SetAccentColor(static_cast(Settings::application.accent_color)); - // Load Fonts (using resource manager, NB: a temporary copy of the raw data is necessary) + // Estalish the base size from the resolution of the monitor float base_font_size = (Rendering::manager().MonitorHeight() * Rendering::manager().DPIScale()) / 100.f ; + // Load Fonts (using resource manager, NB: a temporary copy of the raw data is necessary) ImGuiToolkit::SetFont(ImGuiToolkit::FONT_DEFAULT, "Roboto-Regular", int(base_font_size) ); ImGuiToolkit::SetFont(ImGuiToolkit::FONT_BOLD, "Roboto-Bold", int(base_font_size) ); ImGuiToolkit::SetFont(ImGuiToolkit::FONT_ITALIC, "Roboto-Italic", int(base_font_size) ); @@ -164,8 +165,7 @@ bool UserInterface::Init() // info Log::Info("Monitor (%.1f,%.1f)", Rendering::manager().MonitorWidth(), Rendering::manager().MonitorHeight()); - Log::Info("DPI Scale %.1f", Rendering::manager().DPIScale()); - Log::Info("Font size %.1f", base_font_size); + Log::Info("Font size %df", int(base_font_size) ); // Style ImGuiStyle& style = ImGui::GetStyle();