mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27:35 +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:
parent
2cb0039a13
commit
df57d7ca68
8 changed files with 66 additions and 16 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue