RS = 14;
Coeng = 15;
-c = C | Ra;
-n = (N.N? | ZWNJ?.RS);
-z = ZWJ|ZWNJ;
-h = H | Coeng;
-matra_group = (M | RS) N? H?;
-syllable_tail = SM? (VD VD?)?;
+c = C | Ra; # is_consonant
+n = (N.N? | ZWNJ?.RS); # is_consonant_modifier
+z = ZWJ|ZWNJ; # is_joiner
+h = H | Coeng; # is_halant_or_coeng
+matra_group = M.N?.H?;
+syllable_tail = SM? (Coeng (c|V))? (VD VD?)?;
place_holder = NBSP | DOTTEDCIRCLE;
-consonant_syllable = (c.n? (h.z?|z.h))* c.n? A? (h.z? | matra_group*)? (Coeng (c|V))? syllable_tail;
+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;
other = any;
OT_A,
OT_NBSP,
OT_DOTTEDCIRCLE, /* Not in the spec, but special in Uniscribe. /Very very/ special! */
- OT_RS, /* Register Shifter (and other marks), used in Khmer OT spec */
+ OT_RS, /* Register Shifter, used in Khmer OT spec */
OT_Coeng
};
info.indic_category() = OT_VD;
if (info.indic_category() == OT_X &&
- unlikely (hb_in_range<hb_codepoint_t> (info.codepoint, 0x17CB, 0x17D0)))
- info.indic_category() = OT_RS;
+ unlikely (hb_in_range<hb_codepoint_t> (info.codepoint, 0x17CB, 0x17D2))) /* Khmer Various signs */
+ info.indic_category() = OT_N;
/* Khmer Virama is different since it can be used to form a final consonant. */
if (unlikely (info.codepoint == 0x17D2))
{
/* Please update the Uniscribe branch when touching this! */
for (unsigned int i = start + 1; i < end; i++)
- if ((FLAG (info[i].indic_category()) & (FLAG (OT_ZWNJ) | FLAG (OT_ZWJ) | FLAG (OT_N) | FLAG (OT_H))))
+ if ((FLAG (info[i].indic_category()) & (FLAG (OT_ZWNJ) | FLAG (OT_ZWJ) | FLAG (OT_N) | FLAG (OT_RS) | FLAG (OT_H))))
info[i].indic_position() = info[i - 1].indic_position();
} else {
/*
*/
/* Please update the non-Uniscribe branch when touching this! */
for (unsigned int i = start + 1; i < end; i++)
- if ((FLAG (info[i].indic_category()) & (FLAG (OT_ZWNJ) | FLAG (OT_ZWJ) | FLAG (OT_N) | FLAG (OT_H)))) {
+ if ((FLAG (info[i].indic_category()) & (FLAG (OT_ZWNJ) | FLAG (OT_ZWJ) | FLAG (OT_N) | FLAG (OT_RS) | FLAG (OT_H)))) {
info[i].indic_position() = info[i - 1].indic_position();
if (info[i].indic_category() == OT_H && info[i].indic_position() == POS_PRE_M)
for (unsigned int j = i; j > start; j--)