[GPOS] Minor shuffling
This commit is contained in:
parent
0f6278d1fb
commit
806ad8dc65
|
@ -1522,10 +1522,11 @@ reverse_cursive_minor_offset (hb_glyph_position_t *pos, unsigned int i, hb_direc
|
||||||
if (likely (!j))
|
if (likely (!j))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
j += i;
|
int old_chain = j;
|
||||||
|
|
||||||
pos[i].cursive_chain() = 0;
|
pos[i].cursive_chain() = 0;
|
||||||
|
|
||||||
|
j += i;
|
||||||
|
|
||||||
/* Stop if we see new parent in the chain. */
|
/* Stop if we see new parent in the chain. */
|
||||||
if (j == new_parent)
|
if (j == new_parent)
|
||||||
return;
|
return;
|
||||||
|
@ -1537,7 +1538,7 @@ reverse_cursive_minor_offset (hb_glyph_position_t *pos, unsigned int i, hb_direc
|
||||||
else
|
else
|
||||||
pos[j].x_offset = -pos[i].x_offset;
|
pos[j].x_offset = -pos[i].x_offset;
|
||||||
|
|
||||||
pos[j].cursive_chain() = i - j;
|
pos[j].cursive_chain() = -old_chain;
|
||||||
}
|
}
|
||||||
static void
|
static void
|
||||||
fix_cursive_minor_offset (hb_glyph_position_t *pos, unsigned int i, hb_direction_t direction)
|
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();
|
unsigned int j = pos[i].cursive_chain();
|
||||||
if (likely (!j))
|
if (likely (!j))
|
||||||
return;
|
return;
|
||||||
|
pos[i].cursive_chain() = 0;
|
||||||
|
|
||||||
j += i;
|
j += i;
|
||||||
|
|
||||||
pos[i].cursive_chain() = 0;
|
|
||||||
|
|
||||||
fix_cursive_minor_offset (pos, j, direction);
|
fix_cursive_minor_offset (pos, j, direction);
|
||||||
|
|
||||||
if (HB_DIRECTION_IS_HORIZONTAL (direction))
|
if (HB_DIRECTION_IS_HORIZONTAL (direction))
|
||||||
|
|
Loading…
Reference in New Issue