Disable mark advance zeroing as well as mark fallback positioning if doing kerx
This commit is contained in:
parent
8496753796
commit
504cb68fc9
|
@ -114,7 +114,7 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan,
|
||||||
}
|
}
|
||||||
|
|
||||||
plan.has_gpos_mark = !!plan.map.get_1_mask (HB_TAG ('m','a','r','k'));
|
plan.has_gpos_mark = !!plan.map.get_1_mask (HB_TAG ('m','a','r','k'));
|
||||||
if (!plan.apply_gpos)
|
if (!plan.apply_gpos && !plan.apply_kerx)
|
||||||
plan.fallback_mark_positioning = true;
|
plan.fallback_mark_positioning = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -820,34 +820,36 @@ hb_ot_position_complex (const hb_ot_shape_context_t *c)
|
||||||
|
|
||||||
hb_ot_layout_position_start (c->font, c->buffer);
|
hb_ot_layout_position_start (c->font, c->buffer);
|
||||||
|
|
||||||
switch (c->plan->shaper->zero_width_marks)
|
if (!c->plan->apply_kerx)
|
||||||
{
|
switch (c->plan->shaper->zero_width_marks)
|
||||||
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_EARLY:
|
{
|
||||||
zero_mark_widths_by_gdef (c->buffer, adjust_offsets_when_zeroing);
|
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_EARLY:
|
||||||
break;
|
zero_mark_widths_by_gdef (c->buffer, adjust_offsets_when_zeroing);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE:
|
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE:
|
||||||
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE:
|
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c->plan->apply_gpos)
|
if (c->plan->apply_gpos)
|
||||||
c->plan->position (c->font, c->buffer);
|
;//c->plan->position (c->font, c->buffer);
|
||||||
else if (c->plan->apply_kerx)
|
else if (c->plan->apply_kerx)
|
||||||
hb_aat_layout_position (c->plan, c->font, c->buffer);
|
hb_aat_layout_position (c->plan, c->font, c->buffer);
|
||||||
|
|
||||||
switch (c->plan->shaper->zero_width_marks)
|
if (!c->plan->apply_kerx)
|
||||||
{
|
switch (c->plan->shaper->zero_width_marks)
|
||||||
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE:
|
{
|
||||||
zero_mark_widths_by_gdef (c->buffer, adjust_offsets_when_zeroing);
|
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE:
|
||||||
break;
|
zero_mark_widths_by_gdef (c->buffer, adjust_offsets_when_zeroing);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE:
|
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE:
|
||||||
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_EARLY:
|
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_EARLY:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Finishing off GPOS has to follow a certain order. */
|
/* Finishing off GPOS has to follow a certain order. */
|
||||||
hb_ot_layout_position_finish_advances (c->font, c->buffer);
|
hb_ot_layout_position_finish_advances (c->font, c->buffer);
|
||||||
|
|
Loading…
Reference in New Issue