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:
Aliaksandr Kalenik 2024-09-06 01:19:53 +02:00 committed by Tim Flynn
commit ec315667f0
Notes: github-actions[bot] 2024-09-06 12:31:34 +00:00
8 changed files with 37 additions and 72 deletions

View file

@ -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) {