[kerx] Don't disable crossKerning if kern feature is off
This commit is contained in:
parent
0c3b061ac2
commit
649cc3ef27
|
@ -314,7 +314,7 @@ struct KerxSubTableFormat1
|
||||||
v = 0;
|
v = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (idx < buffer->len && buffer->info[idx].mask & kern_mask)
|
if (idx < buffer->len)
|
||||||
{
|
{
|
||||||
if (HB_DIRECTION_IS_HORIZONTAL (buffer->props.direction))
|
if (HB_DIRECTION_IS_HORIZONTAL (buffer->props.direction))
|
||||||
{
|
{
|
||||||
|
@ -324,7 +324,7 @@ struct KerxSubTableFormat1
|
||||||
if (!buffer->pos[idx].y_offset)
|
if (!buffer->pos[idx].y_offset)
|
||||||
buffer->pos[idx].y_offset += c->font->em_scale_y (crossOffset);
|
buffer->pos[idx].y_offset += c->font->em_scale_y (crossOffset);
|
||||||
}
|
}
|
||||||
else
|
else if (buffer->info[idx].mask & kern_mask)
|
||||||
{
|
{
|
||||||
if (!buffer->pos[idx].x_offset)
|
if (!buffer->pos[idx].x_offset)
|
||||||
{
|
{
|
||||||
|
@ -342,7 +342,7 @@ struct KerxSubTableFormat1
|
||||||
if (!buffer->pos[idx].x_offset)
|
if (!buffer->pos[idx].x_offset)
|
||||||
buffer->pos[idx].x_offset = c->font->em_scale_x (crossOffset);
|
buffer->pos[idx].x_offset = c->font->em_scale_x (crossOffset);
|
||||||
}
|
}
|
||||||
else
|
else if (buffer->info[idx].mask & kern_mask)
|
||||||
{
|
{
|
||||||
if (!buffer->pos[idx].y_offset)
|
if (!buffer->pos[idx].y_offset)
|
||||||
{
|
{
|
||||||
|
@ -375,7 +375,8 @@ struct KerxSubTableFormat1
|
||||||
{
|
{
|
||||||
TRACE_APPLY (this);
|
TRACE_APPLY (this);
|
||||||
|
|
||||||
if (!c->plan->requested_kerning)
|
if (!c->plan->requested_kerning &&
|
||||||
|
!(header.coverage & header.CrossStream))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
driver_context_t dc (this, c);
|
driver_context_t dc (this, c);
|
||||||
|
|
|
@ -124,7 +124,7 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan,
|
||||||
else if (hb_aat_layout_has_positioning (face))
|
else if (hb_aat_layout_has_positioning (face))
|
||||||
plan.apply_kerx = true;
|
plan.apply_kerx = true;
|
||||||
|
|
||||||
if (plan.requested_kerning && !plan.apply_kerx && !has_gpos_kern)
|
if (!plan.apply_kerx && !has_gpos_kern)
|
||||||
{
|
{
|
||||||
/* Apparently Apple applies kerx if GPOS kern was not applied. */
|
/* Apparently Apple applies kerx if GPOS kern was not applied. */
|
||||||
if (hb_aat_layout_has_positioning (face))
|
if (hb_aat_layout_has_positioning (face))
|
||||||
|
|
Loading…
Reference in New Issue