kashida 0.2.1

Insert Kashidas/Tatweel into Arabic text, e.g. for justification purposes.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use kashida::place_kashidas;

fn main() {
    static EXAMPLE_TEXT: &str = "والعصر إن الإنسان لفي خسر إلا الذين آمنوا وعملوا الصالحات";

    let candidates = kashida::find_kashidas(EXAMPLE_TEXT, kashida::Script::Arabic);
    println!("{candidates:?}");

    let count = 6;
    let input = place_kashidas(EXAMPLE_TEXT, &candidates, count);

    println!("{input}");
}