提交 ea579f9c 编写于 作者: B Behdad Esfahbod

[kerx] Fix peculiar indexing that was needed previously

Not needed now that we use GPOS attachment for cursive kerx.
上级 6ee6cd93
...@@ -286,23 +286,18 @@ struct KerxSubTableFormat1 ...@@ -286,23 +286,18 @@ struct KerxSubTableFormat1
/* From Apple 'kern' spec: /* From Apple 'kern' spec:
* "Each pops one glyph from the kerning stack and applies the kerning value to it. * "Each pops one glyph from the kerning stack and applies the kerning value to it.
* The end of the list is marked by an odd value... */ * The end of the list is marked by an odd value... */
unsigned int i;
for (i = 0; i < depth; i++)
if (actions[i] & 1)
{
i++;
break;
}
unsigned int tuple_count = table->header.tuple_count (); unsigned int tuple_count = table->header.tuple_count ();
tuple_count = tuple_count ? tuple_count : 1; tuple_count = tuple_count ? tuple_count : 1;
for (; i; i--) bool last = false;
while (!last && depth--)
{ {
unsigned int idx = stack[depth - i]; unsigned int idx = stack[depth];
int v = *actions;
actions += tuple_count;
if (idx >= buffer->len) continue; if (idx >= buffer->len) continue;
int v = actions[(i - 1) * tuple_count]; /* "The end of the list is marked by an odd value..." */
last = v & 1;
/* "The end of the list is marked by an odd value..." Ignore it. */
v &= ~1; v &= ~1;
hb_glyph_position_t &o = buffer->pos[idx]; hb_glyph_position_t &o = buffer->pos[idx];
...@@ -355,7 +350,6 @@ struct KerxSubTableFormat1 ...@@ -355,7 +350,6 @@ struct KerxSubTableFormat1
} }
} }
} }
depth = 0;
} }
return true; return true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册