unicode-shaper
Version:
Shape unicode text so that renderers like WebGL and WebGPU can properly display the glyphs.
29 lines • 1.2 kB
TypeScript
/**
* Check if a character is Tibetan
* @param c - input unicode character
* @returns - True if Tibetan
*/
export declare function isTibetan(c: number): boolean;
/**
* Shape/Reordering characters
* Once the Myanmar shaping engine has analyzed the run as described above,
* it creates a buffer of appropriately reordered elements (glyphs) representing the
* cluster according to the rules given:
*
* 1) Kinzi sequences (K) are reordered directly after the cluster base
* 2) The medial ra (MR) is reordered before the base consonant
* 3) Pre-base vowels (VPre) are reordered to the start of the syllable cluster.
* A sequence of multiple prebase vowels is permitted. Such sequences are moved
* as a block to the beginning of the cluster.
* 4) Anusvara (A) coming immediately after one or more below-base vowels (VBlw)
* will reorder immediately before them.
*
* Cases:
* 1) Letters: Lh [Ls*] <[Va*] | [Vb] | [Vc] > [Ml]
* 2) Digits: D [Md]
*
* Ex. བོད་རང་སྐྱོང་ལྗོངས།
* @param input - input unicode buffer to be modified/shaped
*/
export declare function shapeTibetan(input: number[]): void;
//# sourceMappingURL=tibetan.d.ts.map