@@ -156,7 +156,7 @@ static void setupStandardFont(SDL_Window* window, SDL_Renderer* renderer)
156156
157157 const float font_scaling_factor = getFontScale (window, renderer);
158158 if (!std::filesystem::exists (fontFile)) {
159- io.FontGlobalScale = font_scaling_factor;
159+ // io.FontGlobalScale = font_scaling_factor;
160160 } else {
161161 constexpr int DefaultFontSize = 13 ;
162162 ImFontConfig config;
@@ -166,10 +166,6 @@ static void setupStandardFont(SDL_Window* window, SDL_Renderer* renderer)
166166
167167 // TODO: Load to memory for unicode paths and load via AddFontFromMemoryTTF
168168 io.Fonts ->AddFontFromFileTTF (fontFile.generic_string ().c_str (), config.SizePixels , &config);
169- #ifdef IG_OS_WINDOWS
170- // Why is this needed on Windows but not on other systems??
171- io.FontGlobalScale = 1 / font_scaling_factor;
172- #endif
173169 }
174170}
175171
@@ -194,8 +190,6 @@ void setup(SDL_Window* window, SDL_Renderer* renderer, bool useDocking, float dp
194190 IG_UNUSED (useDocking);
195191#endif
196192
197- setupStandardFont (window, renderer);
198-
199193 ImGuiStyle& style = ImGui::GetStyle ();
200194 style.GrabRounding = 3 ;
201195 style.TabRounding = 3 ;
@@ -222,6 +216,8 @@ void setup(SDL_Window* window, SDL_Renderer* renderer, bool useDocking, float dp
222216 ImGuiSDL::Initialize (renderer, width, height);
223217 }
224218#endif
219+
220+ setupStandardFont (window, renderer);
225221}
226222
227223void shutdown ()
0 commit comments