pub enum Shaping {
Auto,
Basic,
Advanced,
}
Expand description
The shaping strategy of some text.
Variants§
Auto
Auto-detect the best shaping strategy from the text.
This strategy will use Basic
shaping if the
text consists of only ASCII characters; otherwise, it will
use Advanced
shaping.
This is the default, if neither the basic-shaping
nor advanced-shaping
features are enabled.
Basic
No shaping and 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.
This will be the default if the basic-shaping
feature is enabled and
the advanced-shaping
feature is disabled.
Advanced
Advanced text shaping and font fallback.
You will need to enable this flag 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 shaping is expensive! You should only enable it when necessary.
This will be the default if the advanced-shaping
feature is enabled.