From f93cab76791267f7f2278cad8bc6f470f1532c65 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Sun, 3 Dec 2023 22:32:28 +0100 Subject: [PATCH] LibWeb/Painting: Use scaled font for selected text Fixes regression introduced in: https://github.com/SerenityOS/serenity/commit/681771d2108a6f82c138f1dbccc2a2d2ef5abae7 --- Userland/Libraries/LibWeb/Painting/PaintableBox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp index d42c5404e7..9fcd8477b8 100644 --- a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp +++ b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp @@ -662,7 +662,7 @@ static void paint_text_fragment(PaintContext& context, Layout::TextNode const& t painter.fill_rect(selection_rect, CSS::SystemColor::highlight()); RecordingPainterStateSaver saver(painter); painter.add_clip_rect(selection_rect); - painter.draw_text_run(baseline_start.to_type(), fragment.glyph_run(), CSS::SystemColor::highlight_text(), fragment_absolute_device_rect.to_type()); + painter.draw_text_run(baseline_start.to_type(), scaled_glyph_run, CSS::SystemColor::highlight_text(), fragment_absolute_device_rect.to_type()); } paint_text_decoration(context, text_node, fragment);