From dec4231d49dba9edc339a0cb212938adbec816b1 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Thu, 16 Feb 2023 20:53:58 +0100 Subject: [PATCH] impr: Make sure fonts don't get blurry on non-integer scalings --- plugins/builtin/source/content/settings_entries.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/builtin/source/content/settings_entries.cpp b/plugins/builtin/source/content/settings_entries.cpp index 9ee007e2f..38b4949a9 100644 --- a/plugins/builtin/source/content/settings_entries.cpp +++ b/plugins/builtin/source/content/settings_entries.cpp @@ -585,7 +585,7 @@ namespace hex::plugin::builtin { ImHexApi::System::impl::setCustomFontPath(fontFile); // If a custom font has been loaded now, also load the font size - float fontSize = ImHexApi::System::DefaultFontSize * ImHexApi::System::getGlobalScale(); + float fontSize = ImHexApi::System::DefaultFontSize * std::round(ImHexApi::System::getGlobalScale()); if (!fontFile.empty()) { fontSize = ContentRegistry::Settings::read("hex.builtin.setting.font", "hex.builtin.setting.font.font_size", 13) * ImHexApi::System::getGlobalScale(); }