Files
ladybird/Tests/LibWeb/Text/expected/css/text-underline-position.txt
Jelle Raaijmakers b38b7d0ae3 LibWeb: Draw text decoration lines with the right offset
For some text decorations (e.g. underline) we were using the line's top
edge as the Y-coordinate to draw the line at, which combined with the
line's thickness meant that it was positioned too high up.

Correct this by calculating the line's center Y position.
2026-03-26 12:15:36 +00:00

13 lines
525 B
Plaintext

AccumulatedVisualContext Tree:
[1] scroll_frame_id=1 (PaintableWithLines(BlockContainer<PRE>#out))
DisplayList:
SaveLayer@0
DrawGlyphRun@1 rect=[35,8 8x18] translation=[35.15625,21.796875] color=rgb(0, 0, 0)
DrawGlyphRun@1 rect=[8,8 28x18] translation=[8,21.796875] color=rgb(0, 0, 0)
DrawLine@1 from=[8,25] to=[35,25] color=rgb(0, 0, 0) thickness=2
DrawGlyphRun@1 rect=[43,8 28x18] translation=[43.15625,21.796875] color=rgb(0, 0, 0)
DrawLine@1 from=[43,28] to=[71,28] color=rgb(0, 0, 0) thickness=2
Restore@0