From ee58f3bc75d2d071a71b94063bf12205a5871acb Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 30 Jul 2011 19:15:53 -0400 Subject: [PATCH] Minor --- src/hb-ot-shape-complex-indic.cc | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index 4376e7f..f054a07 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -406,6 +406,7 @@ found_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buffer, hb_mask_t unsigned int start, unsigned int end) { unsigned int i; + hb_glyph_info_t *info = buffer->info; /* Comments from: * https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx */ @@ -431,12 +432,12 @@ found_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buffer, hb_mask_t do { i--; /* -> until a consonant is found */ - if (buffer->info[i].indic_category() == OT_C) + if (info[i].indic_category() == OT_C) { /* -> that does not have a below-base or post-base form * (post-base forms have to follow below-base forms), */ - if (buffer->info[i].indic_position() != POS_BELOW && - buffer->info[i].indic_position() != POS_POST) + if (info[i].indic_position() != POS_BELOW && + info[i].indic_position() != POS_POST) { base = i; break; @@ -492,32 +493,32 @@ found_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buffer, hb_mask_t /* Reorder characters */ for (i = start; i < base; i++) - buffer->info[i].indic_position() = POS_PRE; - buffer->info[base].indic_position() = POS_BASE; + info[i].indic_position() = POS_PRE; + info[base].indic_position() = POS_BASE; /* Attach ZWJ, ZWNJ, nukta, and halant to previous char to move with them. */ for (i = start + 1; i < end; i++) - if ((FLAG (buffer->info[i].indic_category()) & + if ((FLAG (info[i].indic_category()) & (FLAG (OT_ZWNJ) | FLAG (OT_ZWJ) | FLAG (OT_N) | FLAG (OT_H)))) - buffer->info[i].indic_position() = buffer->info[i - 1].indic_position(); + info[i].indic_position() = info[i - 1].indic_position(); /* We do bubble-sort, skip malicious clusters attempts */ if (end - start > 20) return; /* Sit tight, rock 'n roll! */ - hb_bubble_sort (buffer->info + start, end - start, compare_indic_order); + hb_bubble_sort (info + start, end - start, compare_indic_order); /* Setup masks now */ /* Pre-base */ for (i = start; i < base; i++) - buffer->info[i].mask |= mask_array[HALF] | mask_array[AKHN]; + info[i].mask |= mask_array[HALF] | mask_array[AKHN]; /* Base */ - buffer->info[base].mask |= mask_array[AKHN]; + info[base].mask |= mask_array[AKHN]; /* Post-base */ for (i = base + 1; i < end; i++) - buffer->info[i].mask |= mask_array[BLWF] | mask_array[PSTF]; + info[i].mask |= mask_array[BLWF] | mask_array[PSTF]; } -- 2.7.4