1
0
mirror of synced 2025-01-19 01:24:15 +01:00

impr: Make sure fonts don't get blurry on non-integer scalings

This commit is contained in:
WerWolv 2023-02-16 20:53:58 +01:00
parent fb1d12ebf3
commit dec4231d49

View File

@ -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();
}