[Indic] Recognizer Register Shifter marks

Fixes another 6% of the Khmer failures.
This commit is contained in:
Behdad Esfahbod 2012-07-16 16:45:22 -04:00
parent 60da763dfa
commit 7d09c98a1f
3 changed files with 7 additions and 3 deletions

View File

@ -52,11 +52,12 @@ VD = 10;
A = 11; A = 11;
NBSP = 12; NBSP = 12;
DOTTEDCIRCLE = 13; DOTTEDCIRCLE = 13;
RS = 14;
c = C | Ra; c = C | Ra;
n = N N?; n = N N?;
z = ZWJ|ZWNJ; z = ZWJ|ZWNJ;
matra_group = M N? H?; matra_group = (M | RS) N? H?;
syllable_tail = SM? (VD VD?)?; syllable_tail = SM? (VD VD?)?;
place_holder = NBSP | DOTTEDCIRCLE; place_holder = NBSP | DOTTEDCIRCLE;

View File

@ -58,7 +58,8 @@ enum indic_category_t {
OT_VD, OT_VD,
OT_A, OT_A,
OT_NBSP, OT_NBSP,
OT_DOTTEDCIRCLE /* Not in the spec, but special in Uniscribe. /Very very/ special! */ OT_DOTTEDCIRCLE, /* Not in the spec, but special in Uniscribe. /Very very/ special! */
OT_RS /* Register Shifter, used in Khmer OT spec */
}; };
/* Visual positions in a syllable from left to right. */ /* Visual positions in a syllable from left to right. */
@ -92,7 +93,7 @@ enum indic_syllabic_category_t {
INDIC_SYLLABIC_CATEGORY_CONSONANT_REPHA = OT_C, INDIC_SYLLABIC_CATEGORY_CONSONANT_REPHA = OT_C,
INDIC_SYLLABIC_CATEGORY_MODIFYING_LETTER = OT_X, INDIC_SYLLABIC_CATEGORY_MODIFYING_LETTER = OT_X,
INDIC_SYLLABIC_CATEGORY_NUKTA = OT_N, INDIC_SYLLABIC_CATEGORY_NUKTA = OT_N,
INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER = OT_X, INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER = OT_RS,
INDIC_SYLLABIC_CATEGORY_TONE_LETTER = OT_X, INDIC_SYLLABIC_CATEGORY_TONE_LETTER = OT_X,
INDIC_SYLLABIC_CATEGORY_TONE_MARK = OT_X, INDIC_SYLLABIC_CATEGORY_TONE_MARK = OT_X,
INDIC_SYLLABIC_CATEGORY_VIRAMA = OT_H, INDIC_SYLLABIC_CATEGORY_VIRAMA = OT_H,

View File

@ -261,6 +261,8 @@ _hb_ot_shape_complex_setup_masks_indic (hb_ot_map_t *map HB_UNUSED,
info.indic_position() = consonant_position (info.codepoint); info.indic_position() = consonant_position (info.codepoint);
if (is_ra (info.codepoint)) if (is_ra (info.codepoint))
info.indic_category() = OT_Ra; info.indic_category() = OT_Ra;
} else if (info.indic_category() == OT_RS) {
info.indic_position() = POS_ABOVE_M;
} else if (info.indic_category() == OT_SM || } else if (info.indic_category() == OT_SM ||
info.indic_category() == OT_VD) { info.indic_category() == OT_VD) {
info.indic_position() = POS_SMVD; info.indic_position() = POS_SMVD;