1
0
mirror of synced 2025-01-11 05:42:15 +01:00

impr: Keep default font at whole-integer sizes

This commit is contained in:
WerWolv 2024-12-28 20:46:26 +01:00
parent c4918a963c
commit c8e95cf3c3

View File

@ -65,7 +65,7 @@ namespace hex::fonts {
Font addDefaultFont() { Font addDefaultFont() {
ImFontConfig config = m_config; ImFontConfig config = m_config;
config.FontBuilderFlags |= ImGuiFreeTypeBuilderFlags_Monochrome | ImGuiFreeTypeBuilderFlags_MonoHinting; config.FontBuilderFlags |= ImGuiFreeTypeBuilderFlags_Monochrome | ImGuiFreeTypeBuilderFlags_MonoHinting;
config.SizePixels = getAdjustedFontSize(std::floor(ImHexApi::System::getGlobalScale()) * 13.0F); config.SizePixels = std::floor(getAdjustedFontSize(ImHexApi::System::getGlobalScale() * 13.0F));
auto font = m_fontAtlas->AddFontDefault(&config); auto font = m_fontAtlas->AddFontDefault(&config);
m_fontSizes.emplace_back(false, config.SizePixels); m_fontSizes.emplace_back(false, config.SizePixels);