Make FontSystem global and simplify Paragraph API

This commit is contained in:
Héctor Ramón Jiménez 2023-09-11 02:47:24 +02:00
parent 9245423c5d
commit 346af3f8b0
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
15 changed files with 165 additions and 328 deletions

View file

@ -212,19 +212,16 @@ where
let State(ref mut paragraph) = state;
renderer.update_paragraph(
paragraph,
text::Text {
content,
bounds,
size,
line_height,
font,
shaping,
horizontal_alignment,
vertical_alignment,
},
);
paragraph.update(text::Text {
content,
bounds,
size,
line_height,
font,
shaping,
horizontal_alignment,
vertical_alignment,
});
let size = limits.resolve(paragraph.min_bounds());