pull/1/head
Behdad Esfahbod 13 years ago
parent dbccf87eef
commit 92332e5116
  1. 41
      src/hb-ot-shape-complex-indic.cc

@ -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;
buffer->info[i].indic_position() = type >> 4; info.indic_category() = type & 0x0F;
info.indic_position() = type >> 4;
if (buffer->info[i].indic_category() == OT_C) {
buffer->info[i].indic_position() = consonant_position (buffer->info[i].codepoint); if (info.indic_category() == OT_C) {
if (is_ra (buffer->info[i].codepoint)) info.indic_position() = consonant_position (info.codepoint);
buffer->info[i].indic_category() = OT_Ra; if (is_ra (info.codepoint))
} else if (buffer->info[i].indic_category() == OT_SM || info.indic_category() = OT_Ra;
buffer->info[i].indic_category() == OT_VD) { } else if (info.indic_category() == OT_SM ||
buffer->info[i].indic_position() = POS_SMVD; info.indic_category() == OT_VD) {
} else if (unlikely (buffer->info[i].codepoint == 0x200C)) info.indic_position() = POS_SMVD;
buffer->info[i].indic_category() = OT_ZWNJ; } else if (unlikely (info.codepoint == 0x200C))
else if (unlikely (buffer->info[i].codepoint == 0x200D)) info.indic_category() = OT_ZWNJ;
buffer->info[i].indic_category() = OT_ZWJ; else if (unlikely (info.codepoint == 0x200D))
info.indic_category() = OT_ZWJ;
if (unlikely (buffer->info[i].codepoint == 0x0952)) {
buffer->info[i].indic_category() = OT_A; if (unlikely (info.codepoint == 0x0952)) {
buffer->info[i].indic_position() = POS_SMVD; info.indic_category() = OT_A;
info.indic_position() = POS_SMVD;
} }
} }
} }

Loading…
Cancel
Save