diff --git a/src/td/input/Display.cpp b/src/td/input/Display.cpp index ec3a2cc..ff37c6e 100644 --- a/src/td/input/Display.cpp +++ b/src/td/input/Display.cpp @@ -95,11 +95,16 @@ Display::Display(int a_Width, int a_Height, const std::string& a_Title) : // Setup scaling float main_scale = SDL_GetDisplayContentScale(SDL_GetPrimaryDisplay()); - ImGuiStyle& style = ImGui::GetStyle(); - style.ScaleAllSizes(main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this - // requires resetting Style + calling this again) - style.FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave - // both here for documentation purpose) + // ImGuiStyle& style = ImGui::GetStyle(); + // style.ScaleAllSizes(main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this + // // requires resetting Style + calling this again) + // style.FontSizeBase = 13 * main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave + // // both here for documentation purpose) + + + ImFontConfig cfg; + cfg.SizePixels = 13 * main_scale * 2; + io.Fonts->AddFontDefault(&cfg); // Setup Platform/Renderer backends ImGui_ImplSDL3_InitForOpenGL(m_Window, m_GLContext);