mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 09:39:39 +00:00
LibGfx+LibWeb: Remove DrawEmoji variant in GlyphRun
It was needed to support bitmap emoji rendering but no longer used after switching to Skia+HarfBuzz for text rendering.
This commit is contained in:
parent
22b8380e37
commit
ec315667f0
Notes:
github-actions[bot]
2024-09-06 12:31:34 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: ec315667f0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1297
Reviewed-by: https://github.com/trflynn89
8 changed files with 37 additions and 72 deletions
|
@ -356,20 +356,11 @@ void InlineFormattingContext::generate_line_boxes(LayoutMode layout_mode)
|
|||
size_t last_glyph_index = 0;
|
||||
auto last_glyph_position = Gfx::FloatPoint();
|
||||
|
||||
for (auto const& glyph_or_emoji : glyphs) {
|
||||
auto this_position = Gfx::FloatPoint();
|
||||
glyph_or_emoji.visit(
|
||||
[&](Gfx::DrawGlyph glyph) {
|
||||
this_position = glyph.position;
|
||||
},
|
||||
[&](Gfx::DrawEmoji emoji) {
|
||||
this_position = emoji.position;
|
||||
});
|
||||
if (this_position.x() > max_text_width)
|
||||
for (auto const& glyph : glyphs) {
|
||||
if (glyph.position.x() > max_text_width)
|
||||
break;
|
||||
|
||||
last_glyph_index++;
|
||||
last_glyph_position = this_position;
|
||||
last_glyph_position = glyph.position;
|
||||
}
|
||||
|
||||
if (last_glyph_index > 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue