Fix graphite intergration reordered clusters problem
This commit is contained in:
parent
8eed9cb11e
commit
4de03a1585
|
@ -307,6 +307,8 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
|
||||||
curradv = gr_slot_origin_X(gr_seg_first_slot(seg));
|
curradv = gr_slot_origin_X(gr_seg_first_slot(seg));
|
||||||
clusters[0].advance = gr_seg_advance_X(seg) - curradv;
|
clusters[0].advance = gr_seg_advance_X(seg) - curradv;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
clusters[0].advance = 0;
|
||||||
for (is = gr_seg_first_slot (seg), ic = 0; is; is = gr_slot_next_in_segment (is), ic++)
|
for (is = gr_seg_first_slot (seg), ic = 0; is; is = gr_slot_next_in_segment (is), ic++)
|
||||||
{
|
{
|
||||||
unsigned int before = gr_slot_before (is);
|
unsigned int before = gr_slot_before (is);
|
||||||
|
@ -332,7 +334,10 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
|
||||||
if (HB_DIRECTION_IS_BACKWARD(buffer->props.direction))
|
if (HB_DIRECTION_IS_BACKWARD(buffer->props.direction))
|
||||||
c->advance = curradv - gr_slot_origin_X(is);
|
c->advance = curradv - gr_slot_origin_X(is);
|
||||||
else
|
else
|
||||||
clusters[ci].advance = gr_slot_origin_X(is) - curradv;
|
{
|
||||||
|
c->advance = 0;
|
||||||
|
clusters[ci].advance += gr_slot_origin_X(is) - curradv;
|
||||||
|
}
|
||||||
ci++;
|
ci++;
|
||||||
curradv = gr_slot_origin_X(is);
|
curradv = gr_slot_origin_X(is);
|
||||||
}
|
}
|
||||||
|
@ -345,7 +350,7 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
|
||||||
if (HB_DIRECTION_IS_BACKWARD(buffer->props.direction))
|
if (HB_DIRECTION_IS_BACKWARD(buffer->props.direction))
|
||||||
clusters[ci].advance += curradv;
|
clusters[ci].advance += curradv;
|
||||||
else
|
else
|
||||||
clusters[ci].advance = gr_seg_advance_X(seg) - curradv;
|
clusters[ci].advance += gr_seg_advance_X(seg) - curradv;
|
||||||
ci++;
|
ci++;
|
||||||
|
|
||||||
for (unsigned int i = 0; i < ci; ++i)
|
for (unsigned int i = 0; i < ci; ++i)
|
||||||
|
|
Loading…
Reference in New Issue