Use Courier for now, to avoid panicking

This commit is contained in:
Antonio Scandurra
2023-10-04 08:48:05 +02:00
parent 25a2554bdd
commit a1ee2db6d1
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -46,11 +46,11 @@ impl<S: 'static> Element for Text<S> {
.line_height
.to_pixels(font_size.into(), cx.rem_size());
let text = self.text.clone();
let paint_state = Arc::new(Mutex::new(None));
let frame_state = Arc::new(Mutex::new(None));
let rem_size = cx.rem_size();
let layout_id = cx.request_measured_layout(Default::default(), rem_size, {
let frame_state = paint_state.clone();
let frame_state = frame_state.clone();
move |_, _| {
let Some(line_layout) = text_system
.layout_line(
@@ -77,7 +77,7 @@ impl<S: 'static> Element for Text<S> {
}
});
Ok((layout_id?, paint_state))
Ok((layout_id?, frame_state))
}
fn paint<'a>(