diff --git a/src/shape.rs b/src/shape.rs index 7183618..c6b7a37 100644 --- a/src/shape.rs +++ b/src/shape.rs @@ -11,9 +11,22 @@ use unicode_segmentation::UnicodeSegmentation; use crate::fallback::FontFallbackIter; use crate::{Align, AttrsList, CacheKey, Color, Font, FontSystem, LayoutGlyph, LayoutLine, Wrap}; +/// The shaping strategy of some text. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub enum Shaping { + /// Basic shaping with no font fallback. + /// + /// This shaping strategy is very cheap, but it will not display complex + /// scripts properly nor try to find missing glyphs in your system fonts. + /// + /// You should use this strategy when you have complete control of the text + /// and the font you are displaying in your application. Basic, + /// Advanced text shaping and font fallback. + /// + /// You will need to enable this strategy if the text contains a complex + /// script, the font used needs it, and/or multiple fonts in your system + /// may be needed to display all of the glyphs. Advanced, }