mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: Unifont glyphs being rendered too far down
This commit is contained in:
@@ -218,11 +218,16 @@ namespace hex::fonts {
|
||||
if (font.defaultSize.has_value())
|
||||
fontSize = font.defaultSize.value() * ImHexApi::System::getBackingScaleFactor();
|
||||
|
||||
const ImVec2 offset = { font.offset.x, font.offset.y + ImCeil(4_scaled) };
|
||||
ImVec2 offset = { font.offset.x, font.offset.y };
|
||||
|
||||
bool scalable = font.scalable.value_or(true);
|
||||
if (scalable) {
|
||||
offset.y += ImCeil(3_scaled);
|
||||
}
|
||||
|
||||
fontAtlas->addFontFromMemory(font.fontData, fontSize, !font.defaultSize.has_value(), offset, glyphRanges.back());
|
||||
|
||||
if (!font.scalable.value_or(true)) {
|
||||
if (!scalable) {
|
||||
std::string fontName = "NonScalable";
|
||||
auto nameSize = fontName.size();
|
||||
memcpy(fontAtlas->getAtlas()->ConfigData[fontIndex].Name, fontName.c_str(), nameSize);
|
||||
|
||||
Reference in New Issue
Block a user