mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibGfx+LibWeb: Update for_each_glyph_position to use font cascade list
This change updates function that builds list of glyphs to use font cascade list to find font for each code point.
This commit is contained in:
committed by
Andreas Kling
parent
2cb0039a13
commit
df57d7ca68
@@ -170,8 +170,10 @@ void Path::text(Utf8View text, Font const& font)
|
||||
}
|
||||
|
||||
auto& scaled_font = static_cast<ScaledFont const&>(font);
|
||||
auto font_list = Gfx::FontCascadeList::create();
|
||||
font_list->add(scaled_font);
|
||||
for_each_glyph_position(
|
||||
last_point(), text, font, [&](DrawGlyphOrEmoji glyph_or_emoji) {
|
||||
last_point(), text, font_list, [&](DrawGlyphOrEmoji glyph_or_emoji) {
|
||||
if (glyph_or_emoji.has<DrawGlyph>()) {
|
||||
auto& glyph = glyph_or_emoji.get<DrawGlyph>();
|
||||
move_to(glyph.position);
|
||||
|
||||
Reference in New Issue
Block a user