diff --git a/src/font/mod.rs b/src/font/mod.rs index 98a0a30d7d..12a011d193 100644 --- a/src/font/mod.rs +++ b/src/font/mod.rs @@ -4,6 +4,8 @@ pub(crate) mod fallback; use core::fmt; use alloc::sync::Arc; +#[cfg(not(feature = "std"))] +use alloc::vec::Vec; use rustybuzz::Face as RustybuzzFace; use self_cell::self_cell; diff --git a/tests/wrap_stability.rs b/tests/wrap_stability.rs index 7bce4d4574..cef810ecd4 100644 --- a/tests/wrap_stability.rs +++ b/tests/wrap_stability.rs @@ -23,11 +23,11 @@ fn stable_wrap() { let mut check_wrap = |text: &_, wrap, start_width| { let line = ShapeLine::new(&mut font_system, text, &attrs, Shaping::Advanced); - let layout_unbounded = line.layout(font_size, start_width, wrap, Some(Align::Left)); + let layout_unbounded = line.layout(font_size, start_width, wrap, Some(Align::Left), None); let max_width = layout_unbounded.iter().map(|l| l.w).fold(0.0, f32::max); let new_limit = f32::min(start_width, max_width); - let layout_bounded = line.layout(font_size, new_limit, wrap, Some(Align::Left)); + let layout_bounded = line.layout(font_size, new_limit, wrap, Some(Align::Left), None); let bounded_max_width = layout_bounded.iter().map(|l| l.w).fold(0.0, f32::max); // For debugging: