diff --git a/src/buffer.rs b/src/buffer.rs index 826b8ef..e459e72 100644 --- a/src/buffer.rs +++ b/src/buffer.rs @@ -331,7 +331,7 @@ impl Buffer { redraw: false, wrap: Wrap::Word, }; - buffer.set_text(font_system, "", Attrs::new(), Shaping::Basic); + buffer.set_text(font_system, "", Attrs::new(), Shaping::Advanced); buffer } diff --git a/src/shape.rs b/src/shape.rs index c6b7a37..37c219d 100644 --- a/src/shape.rs +++ b/src/shape.rs @@ -21,6 +21,7 @@ pub enum Shaping { /// /// You should use this strategy when you have complete control of the text /// and the font you are displaying in your application. + #[cfg(feature = "swash")] Basic, /// Advanced text shaping and font fallback. /// @@ -41,6 +42,7 @@ impl Shaping { span_rtl: bool, ) -> Vec { match self { + #[cfg(feature = "swash")] Self::Basic => shape_skip(font_system, line, attrs_list, start_run, end_run), Self::Advanced => { shape_run(font_system, line, attrs_list, start_run, end_run, span_rtl) @@ -251,6 +253,7 @@ fn shape_run( glyphs } +#[cfg(feature = "swash")] fn shape_skip( font_system: &mut FontSystem, line: &str,