From b5e2ca7300d704649ec2ed88e882657845183e4a Mon Sep 17 00:00:00 2001 From: trompetin17 Date: Mon, 28 Jul 2025 19:12:12 -0500 Subject: [PATCH] Fix GUI text clipping when scaling interface When scaling the GUI, GetCapHeight was incorrectly accounting for m_Scale which caused text to be hidden due to improper clipping calculations. This commit corrects the CapHeight calculation by ensuring that the division by m_Scale is applied, allowing text to be displayed correctly at all GUI scale levels. --- source/graphics/Font.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/graphics/Font.cpp b/source/graphics/Font.cpp index 197e915bb6..c9315f8794 100644 --- a/source/graphics/Font.cpp +++ b/source/graphics/Font.cpp @@ -95,7 +95,7 @@ float CFont::GetHeight() const { float CFont::GetCapHeight() { const CFont::GlyphData* g{GetGlyph(L'I')}; - return (g ? g->yadvance : 0) + std::abs(FPosF26Dot6ToFloat(m_Faces.front()->size->metrics.descender)); + return (g ? g->yadvance : 0) + std::abs(FPosF26Dot6ToFloat(m_Faces.front()->size->metrics.descender)) / m_Scale; } float CFont::GetCharacterWidth(wchar_t c)