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

@@ -42,9 +42,12 @@ public:
// Útil para notificaciones y elementos UI de tamaño fijo
int getTextWidthPhysical(const char* text);
// Obtiene la altura de la fuente
// Obtiene la altura de la fuente (incluye line_gap)
int getTextHeight();
// Obtiene la altura real del glifo (ascender + |descendente|, sin line_gap)
int getGlyphHeight();
// Verifica si está inicializado correctamente
bool isInitialized() const { return font_ != nullptr && renderer_ != nullptr; }