Using ICU4X as the Unicode Database back end for HarfBuzz.
```rust use harfbuzz::{Buffer, Direction, sys}; use icuharfbuzz::newhbunicodefuncs_unstable;
let mut b = Buffer::with("مساء الخير");
let unicodefuncs = newhbunicodefuncsunstable(&icutestdata::unstable()).unwrap();
// NOTE: This currently requires unsafe
code. For progress toward a safe abstraction, see:
// https://github.com/servo/rust-harfbuzz/pull/197
unsafe {
harfbuzz::sys::hbbuffersetunicodefuncs(b.asptr(), unicodefuncs.as_ptr());
}
b.guesssegmentproperties(); asserteq!(b.getdirection(), Direction::RTL); asserteq!(b.getscript(), sys::HBSCRIPTARABIC); ```
For more information on development, authorship, contributing etc. please visit ICU4X home page
.