mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-28 17:16:29 +03:00
Fix underline and strikethrough size when top and bottom positions are the same due to the small difference generated bt the underlineThickness.
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user