Arabic Reshaper Rust
Reconstruct Arabic sentences to be used in applications that don't support Arabic script.
Usage:
resahpe a single line of string
use ;
let reshaper = default;
// You can reshape just a single string using
println!;
// or using `reshape_line` method if you dont want to construct the [ArabicReshaper]
// and you just want to reshape a few strings with default config
println!;
// Both will reconstruct the string and print `ﺳﻼﻡ ﺩﻧﯿﺎ`
reshape a slice of strings
use
let reshaper = default;
let lines = ;
println!;
// or you can just use reshape method in a loop... the choice is yours.
You can check example or test directory for more examples.
Optional features:
- ttf-parser: if you enable this feature the
ReshaperConfigmethod will have another extra method namedfrom_fontthat can be used to enable ligatures only if they exist in the input font.
Credits:
this project is based on the awesome python-arabic-reshaper.
you can check original project in this repository