1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:17:34 +00:00

LibGfx: Make draw_ui_text() underlines take glyph spacing into account

Without this, the underline was ending up too far to the left.
This commit is contained in:
Andreas Kling 2021-04-09 15:44:04 +02:00
parent 8f0fbfaf54
commit eecf60767a

View file

@ -1846,7 +1846,7 @@ void Gfx::Painter::draw_ui_text(const Gfx::IntRect& rect, const StringView& text
draw_line({ x1, y }, { x2, y }, Color::Black);
break;
}
width += font.glyph_or_emoji_width(*it);
width += font.glyph_or_emoji_width(*it) + font.glyph_spacing();
}
}
}