Write docs for Shaping enum
This commit is contained in:
parent
0f055c0a13
commit
9e559e150d
1 changed files with 13 additions and 0 deletions
13
src/shape.rs
13
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,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue