fix: corregir padding asimétrico en HelpOverlay con getGlyphHeight()

Añade TextRenderer::getGlyphHeight() (ascent - descent, sin line_gap)
y lo usa en calculateTextDimensions() para descontar el gap sobrante
de la última línea, aproximando padding superior e inferior simétricos.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-20 19:29:35 +01:00
parent b9b5f0b29f
commit dcea4ebbab
3 changed files with 63 additions and 47 deletions

View File

@@ -361,3 +361,11 @@ int TextRenderer::getTextHeight() {
return TTF_GetFontHeight(font_);
}
int TextRenderer::getGlyphHeight() {
if (!isInitialized()) {
return 0;
}
return TTF_GetFontAscent(font_) - TTF_GetFontDescent(font_);
}