mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
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:
parent
2b7b7d4d23
commit
16e883a9a3
Notes:
github-actions[bot]
2025-04-21 07:52:47 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 16e883a9a3
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4409
2 changed files with 2 additions and 2 deletions
|
@ -554,7 +554,7 @@ Optional<InlineLevelIterator::Item> InlineLevelIterator::next_without_lookahead(
|
|||
auto shape_features = create_and_merge_font_features();
|
||||
auto glyph_run = Gfx::shape_text({ x, 0 }, letter_spacing.to_float(), chunk.view, chunk.font, text_type, shape_features);
|
||||
|
||||
CSSPixels chunk_width = CSSPixels::nearest_value_for(glyph_run->width());
|
||||
CSSPixels chunk_width = CSSPixels::nearest_value_for(glyph_run->width() + x);
|
||||
|
||||
// NOTE: We never consider `content: ""` to be collapsible whitespace.
|
||||
bool is_generated_empty_string = text_node.is_generated() && chunk.length == 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue