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

LibGfx: Add the glyph spacing also to spaces in Painter::draw_text_run()

This caused the text selection not to match the selected glyph after
some words.
This commit is contained in:
Karol Kosek 2022-05-08 21:00:37 +02:00 committed by Andreas Kling
parent 45d78f6435
commit 8a9211de4b

View file

@ -2327,7 +2327,7 @@ void Painter::draw_text_run(FloatPoint const& baseline_start, Utf8View const& st
for (auto code_point_iterator = string.begin(); code_point_iterator != string.end(); ++code_point_iterator) {
auto code_point = *code_point_iterator;
if (code_point == ' ') {
x += space_width;
x += space_width + font.glyph_spacing();
last_code_point = code_point;
continue;
}