LibGfx+LibWeb: Don't include start.x in GlyphRun width

For some reason we were including x offset of start position into glyph
run width. This is not correct and would be revealed by the upcoming
changes.
This commit is contained in:
Aliaksandr Kalenik 2025-04-19 23:36:03 +02:00 committed by Andreas Kling
commit 16e883a9a3
Notes: github-actions[bot] 2025-04-21 07:52:47 +00:00
2 changed files with 2 additions and 2 deletions

View file

@ -59,7 +59,7 @@ RefPtr<GlyphRun> shape_text(FloatPoint baseline_start, float letter_spacing, Utf
point.translate_by(letter_spacing, 0);
}
auto run = adopt_ref(*new Gfx::GlyphRun(move(glyph_run), font, text_type, point.x()));
auto run = adopt_ref(*new Gfx::GlyphRun(move(glyph_run), font, text_type, point.x() - baseline_start.x()));
hb_buffer_reset(buffer);
return run;
}