fix: Icons still following custom font size when using default font

This commit is contained in:
WerWolv
2025-01-13 22:34:30 +01:00
parent 17fff56fa0
commit 1c305ca762

View File

@@ -263,7 +263,12 @@ namespace hex::fonts {
}
float getFontSize() {
return float(ContentRegistry::Settings::read<int>("hex.builtin.setting.font", "hex.builtin.setting.font.font_size", 13)) * ImHexApi::System::getGlobalScale();
const auto pixelPerfectFont = ContentRegistry::Settings::read<bool>("hex.builtin.setting.font", "hex.builtin.setting.font.pixel_perfect_default_font", true);
if (pixelPerfectFont)
return 13.0F * ImHexApi::System::getGlobalScale();
else
return float(ContentRegistry::Settings::read<int>("hex.builtin.setting.font", "hex.builtin.setting.font.font_size", 13)) * ImHexApi::System::getGlobalScale();
}
}