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

[morx] Fix cluster-merging when ligating

Only merge when actual ligature happened.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1305
上级 aa5af8d0
......@@ -399,9 +399,6 @@ struct LigatureSubtable
if (unlikely (!match_length))
return true;
/* TODO Only when ligation happens? */
buffer->merge_out_clusters (match_positions[0], buffer->out_len);
unsigned int cursor = match_length;
do
{
......@@ -437,6 +434,7 @@ struct LigatureSubtable
bool (action & LigActionLast));
if (action & (LigActionStore | LigActionLast))
{
const GlyphID &ligatureData = ligature[ligature_idx];
if (unlikely (!ligatureData.sanitize (&c->sanitizer))) return false;
hb_codepoint_t lig = ligatureData;
......@@ -452,6 +450,9 @@ struct LigatureSubtable
buffer->skip_glyph ();
end--;
}
buffer->move_to (end + 1);
buffer->merge_out_clusters (match_positions[cursor], buffer->out_len);
}
action_idx++;
......
TESTS = \
tests/aat-trak.tests \
tests/aat-morx.tests \
tests/arabic-fallback-shaping.tests \
tests/arabic-feature-order.tests \
tests/arabic-like-joining.tests \
......
../fonts/TestMORXTwentyeight.ttf::U+0041,U+0078,U+0045,U+0079,U+0044,U+0079,U+0079:[A_E_D=0+1394|x=0+529|y=0+510|y=5+510|y=6+510]
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册