mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-24 00:49:46 +00:00
LibGfx+LibWeb: Add some extra fields to glyph run data
We currently have a mixup in LibWeb between code unit offset and glyph offset during hit testing. These extra fields will allow us to correct this discrepency.
This commit is contained in:
parent
b1fe816336
commit
047f521c4c
Notes:
github-actions[bot]
2025-08-22 12:08:06 +00:00
Author: https://github.com/trflynn89
Commit: 047f521c4c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5930
3 changed files with 33 additions and 8 deletions
|
|
@ -395,7 +395,10 @@ void InlineFormattingContext::generate_line_boxes()
|
|||
glyphs.remove(last_glyph_index - 1, remove_item_count);
|
||||
glyphs.append(Gfx::DrawGlyph {
|
||||
.position = last_glyph_position,
|
||||
.glyph_id = glyph_run->font().glyph_id_for_code_point(ellipsis_codepoint) });
|
||||
.length_in_code_units = AK::UnicodeUtils::code_unit_length_for_code_point(ellipsis_codepoint),
|
||||
.glyph_width = glyph_run->font().glyph_width(ellipsis_codepoint),
|
||||
.glyph_id = glyph_run->font().glyph_id_for_code_point(ellipsis_codepoint),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue