mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-05-04 19:10:38 -05:00
fix: Force scaling of default font to be a integer multiple
This commit is contained in:
@@ -230,6 +230,7 @@ namespace hex::plugin::builtin {
|
||||
|
||||
if (fontFile.empty()) {
|
||||
defaultConfig.FontBuilderFlags |= ImGuiFreeTypeBuilderFlags_Monochrome | ImGuiFreeTypeBuilderFlags_MonoHinting;
|
||||
defaultConfig.SizePixels = std::floor(ImHexApi::Fonts::getFontSize() / ImHexApi::Fonts::DefaultFontSize) * ImHexApi::Fonts::DefaultFontSize;
|
||||
defaultFont = fonts->AddFontDefault(&defaultConfig);
|
||||
} else {
|
||||
defaultFont = fonts->AddFontFromFileTTF(wolv::util::toUTF8String(fontFile).c_str(), 0, &defaultConfig, defaultGlyphRanges.Data);
|
||||
|
||||
Reference in New Issue
Block a user