[Indic] Recategorize Khmer coeng sign as a separate category OT_Coeng

Amend the syllable structure to allow a final subscripted consonant
(Coeng+C) and a final subscripted independent vowel (Coeng+V).
Fixes another 2k of Khmer failures.
This commit is contained in:
Behdad Esfahbod 2012-07-17 11:54:28 -04:00
parent deb521dee4
commit c50ed71e9a
3 changed files with 10 additions and 4 deletions

View File

@ -58,14 +58,15 @@ Coeng = 15;
c = C | Ra;
n = N N?;
z = ZWJ|ZWNJ;
h = H | Coeng;
matra_group = (M | RS) N? H?;
syllable_tail = SM? (VD VD?)?;
place_holder = NBSP | DOTTEDCIRCLE;
consonant_syllable = (c.n? (H.z?|z.H))* c.n? A? (H.z? | matra_group*)? syllable_tail;
vowel_syllable = (Ra H)? V n? (z?.H.c | ZWJ.c)* matra_group* syllable_tail;
standalone_cluster = (Ra H)? place_holder n? (z? H c)* matra_group* syllable_tail;
consonant_syllable = (c.n? (h.z?|z.h))* c.n? A? (h.z? | matra_group*)? (Coeng (c|V))? syllable_tail;
vowel_syllable = (Ra H)? V n? (z?.h.c | ZWJ.c)* matra_group* syllable_tail;
standalone_cluster = (Ra H)? place_holder n? (z? h c)* matra_group* syllable_tail;
other = any;
main := |*

View File

@ -276,7 +276,11 @@ _hb_ot_shape_complex_setup_masks_indic (hb_ot_map_t *map HB_UNUSED,
unlikely (hb_in_range<hb_codepoint_t> (info.codepoint, 0x17CB, 0x17D0)))
info.indic_category() = OT_RS;
if (info.indic_category() == OT_C) {
/* Khmer Virama is different since it can be used to form a final consonant. */
if (unlikely (info.codepoint == 0x17D2))
info.indic_category() = OT_Coeng;
if (is_consonant (info)) {
info.indic_position() = consonant_position (info.codepoint);
if (is_ra (info.codepoint))
info.indic_category() = OT_Ra;

View File

@ -7,3 +7,4 @@
រី
រ៍
សៅ
រ្ឥ