Struct ar_reshaper::ReshaperConfig
source · 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,
/* private fields */
}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.
Implementations§
source§impl ReshaperConfig
impl ReshaperConfig
sourcepub fn new(language: Language, ligatures_flags: LigaturesFlags) -> Self
pub fn new(language: Language, ligatures_flags: LigaturesFlags) -> Self
Create a new ReshaperConfig with the given LigaturesFlags.
sourcepub fn update_ligature(&mut self, key: LigatureNames, enable: bool)
pub fn update_ligature(&mut self, key: LigatureNames, enable: bool)
Update the given LigatureNames.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ReshaperConfig
impl Send for ReshaperConfig
impl Sync for ReshaperConfig
impl Unpin for ReshaperConfig
impl UnwindSafe for ReshaperConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more