pub struct ReshaperConfig {
pub language: Language,
pub delete_harakat: bool,
pub shift_harakat_position: bool,
pub delete_tatweel: bool,
pub support_zwj: bool,
pub use_unshaped_instead_of_isolated: bool,
pub support_ligatures: bool,
pub ligatures: Ligatures,
}Expand description
The main Config struct for the ArabicReshaper
You can change all kinds of settings about ArabicReshaper using this struct.
Fields§
§language: LanguageSupported languages are: Arabic, ArabicV2, Kurdish More languages might be supported soon.
delete_harakat: boolWhether to delete the Harakat (Tashkeel) before reshaping or not.
shift_harakat_position: boolWhether to shift the Harakat (Tashkeel) one position so they appear correctly when string is reversed
delete_tatweel: boolWhether to delete the Tatweel (U+0640) before reshaping or not.
support_zwj: boolWhether to support ZWJ (U+200D) or not.
use_unshaped_instead_of_isolated: boolUse unshaped form instead of isolated form.
support_ligatures: boolWhether to use ligatures or not. Serves as a shortcut to disable all ligatures.
ligatures: LigaturesWhen support_ligatures is enabled.
Separate ligatures configuration take precedence over it.
When support_ligatures is disabled,
separate ligatures configurations are ignored.
Implementations§
Source§impl ReshaperConfig
impl ReshaperConfig
Sourcepub const fn new(language: Language, ligatures_flags: LigaturesFlags) -> Self
pub const fn new(language: Language, ligatures_flags: LigaturesFlags) -> Self
Create a new ReshaperConfig with the given LigaturesFlags.
Sourcepub fn to_reshaper(self) -> ArabicReshaper
pub fn to_reshaper(self) -> ArabicReshaper
Create a new ArabicReshaper from the config.
Sourcepub fn update_ligature(&mut self, name: LigatureNames, enable: bool)
pub fn update_ligature(&mut self, name: LigatureNames, enable: bool)
Update the given LigatureNames.
Trait Implementations§
Source§impl Clone for ReshaperConfig
impl Clone for ReshaperConfig
Source§fn clone(&self) -> ReshaperConfig
fn clone(&self) -> ReshaperConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more