mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-01 21:17:44 -05:00
fix: Pixel perfect font not scaling correctly
This commit is contained in:
@@ -1030,11 +1030,16 @@ namespace hex {
|
||||
void Font::push(float size) const {
|
||||
auto font = getFont(m_fontName);
|
||||
|
||||
if (size <= 0.0F && font != nullptr) {
|
||||
size = font->LegacySize;
|
||||
}
|
||||
if (font != nullptr) {
|
||||
if (size <= 0.0F) {
|
||||
size = font->LegacySize;
|
||||
}
|
||||
|
||||
size *= System::getGlobalScale();
|
||||
if (!font->Sources[0]->PixelSnapH)
|
||||
size *= System::getGlobalScale();
|
||||
else
|
||||
size *= std::floor(System::getGlobalScale());
|
||||
}
|
||||
|
||||
ImGui::PushFont(font, size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user