LibWeb: Align text shadows the same way we align text

This makes the shadow line-up correctly on Acid3. :^)
This commit is contained in:
Sam Atkins 2022-03-24 19:15:16 +00:00 committed by Andreas Kling
commit 1499d2421e
Notes: sideshowbarker 2024-07-17 16:49:08 +09:00

View file

@ -159,7 +159,7 @@ void paint_text_shadow(PaintContext& context, Layout::LineBoxFragment const& fra
Gfx::Painter shadow_painter { *shadow_bitmap };
shadow_painter.set_font(context.painter().font());
// FIXME: "Spread" the shadow somehow.
shadow_painter.draw_text(text_rect, fragment.text(), Gfx::TextAlignment::TopLeft, layer.color);
shadow_painter.draw_text(text_rect, fragment.text(), Gfx::TextAlignment::CenterLeft, layer.color);
// Blur
Gfx::FastBoxBlurFilter filter(*shadow_bitmap);