[GPOS] Minor shuffling

This commit is contained in:
Behdad Esfahbod 2016-02-11 14:53:11 +07:00
parent 0f6278d1fb
commit 806ad8dc65
1 changed files with 5 additions and 5 deletions

View File

@ -1522,10 +1522,11 @@ reverse_cursive_minor_offset (hb_glyph_position_t *pos, unsigned int i, hb_direc
if (likely (!j))
return;
j += i;
int old_chain = j;
pos[i].cursive_chain() = 0;
j += i;
/* Stop if we see new parent in the chain. */
if (j == new_parent)
return;
@ -1537,7 +1538,7 @@ reverse_cursive_minor_offset (hb_glyph_position_t *pos, unsigned int i, hb_direc
else
pos[j].x_offset = -pos[i].x_offset;
pos[j].cursive_chain() = i - j;
pos[j].cursive_chain() = -old_chain;
}
static void
fix_cursive_minor_offset (hb_glyph_position_t *pos, unsigned int i, hb_direction_t direction)
@ -1545,11 +1546,10 @@ fix_cursive_minor_offset (hb_glyph_position_t *pos, unsigned int i, hb_direction
unsigned int j = pos[i].cursive_chain();
if (likely (!j))
return;
pos[i].cursive_chain() = 0;
j += i;
pos[i].cursive_chain() = 0;
fix_cursive_minor_offset (pos, j, direction);
if (HB_DIRECTION_IS_HORIZONTAL (direction))