Upgrade the text shaping backend

This commit is contained in:
SGavrl committed 2026-07-30 22:21:00 +00:00
1 parent 92b228059e
commit 0f06ace12b
3 files changed
+32 -64

No files matched your search

+8 -1
View File
@@ -861,7 +861,14 @@ impl TextEngine {
// with links ends up coloring the wrong glyphs), and shaping is a
// small fraction of a page's CSS-cascade-dominated render time.
let rich = spans.iter().map(|(t, a)| (t.as_str(), a.to_attrs()));
buffer.set_rich_text(&mut self.font_system, rich, Attrs::new().family(Family::Name(FAMILY)), Shaping::Advanced);
let defaults = Attrs::new().family(Family::Name(FAMILY));
buffer.set_rich_text(
&mut self.font_system,
rich,
&defaults,
Shaping::Advanced,
None,
);
let align = match base.text_align {
Some(taffy::AlignItems::CENTER) => Some(Align::Center),