This commit is contained in:
Behdad Esfahbod 2012-05-09 17:40:00 +02:00
parent dbccf87eef
commit 92332e5116

View File

@ -170,26 +170,27 @@ _hb_ot_shape_complex_setup_masks_indic (hb_ot_map_t *map, hb_buffer_t *buffer, h
unsigned int count = buffer->len; unsigned int count = buffer->len;
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; i++)
{ {
unsigned int type = get_indic_categories (buffer->info[i].codepoint); hb_glyph_info_t &info = buffer->info[i];
unsigned int type = get_indic_categories (info.codepoint);
buffer->info[i].indic_category() = type & 0x0F; info.indic_category() = type & 0x0F;
buffer->info[i].indic_position() = type >> 4; info.indic_position() = type >> 4;
if (buffer->info[i].indic_category() == OT_C) { if (info.indic_category() == OT_C) {
buffer->info[i].indic_position() = consonant_position (buffer->info[i].codepoint); info.indic_position() = consonant_position (info.codepoint);
if (is_ra (buffer->info[i].codepoint)) if (is_ra (info.codepoint))
buffer->info[i].indic_category() = OT_Ra; info.indic_category() = OT_Ra;
} else if (buffer->info[i].indic_category() == OT_SM || } else if (info.indic_category() == OT_SM ||
buffer->info[i].indic_category() == OT_VD) { info.indic_category() == OT_VD) {
buffer->info[i].indic_position() = POS_SMVD; info.indic_position() = POS_SMVD;
} else if (unlikely (buffer->info[i].codepoint == 0x200C)) } else if (unlikely (info.codepoint == 0x200C))
buffer->info[i].indic_category() = OT_ZWNJ; info.indic_category() = OT_ZWNJ;
else if (unlikely (buffer->info[i].codepoint == 0x200D)) else if (unlikely (info.codepoint == 0x200D))
buffer->info[i].indic_category() = OT_ZWJ; info.indic_category() = OT_ZWJ;
if (unlikely (buffer->info[i].codepoint == 0x0952)) { if (unlikely (info.codepoint == 0x0952)) {
buffer->info[i].indic_category() = OT_A; info.indic_category() = OT_A;
buffer->info[i].indic_position() = POS_SMVD; info.indic_position() = POS_SMVD;
} }
} }
} }