unicode-shaper 0.3.0

Shape unicode text so that renderers like WebGL and WebGPU can properly display the glyphs.
Documentation
1
2
3
4
5
6
7
8
9
10
11
/// Swaps characters in input with characters in comparitor. This is used for multiple languages
pub fn shared_shaper(input: &mut [u16], comparitor: &[u16]) {
    for i in 0..input.len() {
        if i == 0 {
            continue;
        }
        if comparitor.contains(&input[i]) {
            input.swap(i - 1, i);
        }
    }
}