From 06e98fd13747dd327907e3e1205119a72edd4264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Sun, 21 Dec 2025 17:19:25 -0300 Subject: [PATCH] Fix underline and strikethrough size when top and bottom positions are the same due to the small difference generated bt the underlineThickness. --- src/eepp/graphics/text.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/eepp/graphics/text.cpp b/src/eepp/graphics/text.cpp index e5ac4e62d..aa959cc43 100644 --- a/src/eepp/graphics/text.cpp +++ b/src/eepp/graphics/text.cpp @@ -191,6 +191,8 @@ static inline void _drawUnderline( Font* font, Float fontSize, const Color& font Float top = cpos.y + std::floor( fontSize + underlineOffset - ( underlineThickness / 2 ) + 0.5f ); Float bottom = top + std::floor( underlineThickness + 0.5f ); + if ( top == bottom ) + bottom = top + 1; if ( style & Text::Shadow ) { BR->quadsSetTexCoord( 0, 0, 1, 1 ); @@ -232,6 +234,9 @@ static inline void _drawStrikeThrough( Font* font, Float fontSize, const Color& Float top = std::floor( cpos.y + fontSize + strikeThroughOffset - ( underlineThickness / 2 ) + 0.5f ); Float bottom = top + std::floor( underlineThickness + 0.5f ); + if ( top == bottom ) + bottom = top + 1; + if ( style & Text::Shadow ) { BR->quadsSetTexCoord( 0, 0, 1, 1 ); BR->quadsSetColor( shadowColor );