[morx] Reword ligation
Still fails MORX-41. Am talking to Sascha to better understand what CoreText is doing.
This commit is contained in:
parent
c53a25c657
commit
2137582c96
|
@ -393,16 +393,18 @@ struct LigatureSubtable
|
||||||
unsigned int ligature_idx = 0;
|
unsigned int ligature_idx = 0;
|
||||||
|
|
||||||
if (unlikely (!match_length))
|
if (unlikely (!match_length))
|
||||||
return false;
|
return true;
|
||||||
|
|
||||||
|
/* TODO Only when ligation happens? */
|
||||||
buffer->merge_out_clusters (match_positions[0], buffer->out_len);
|
buffer->merge_out_clusters (match_positions[0], buffer->out_len);
|
||||||
|
|
||||||
|
unsigned int cursor = match_length;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (unlikely (!match_length))
|
if (unlikely (!cursor))
|
||||||
return false;
|
break;
|
||||||
|
|
||||||
buffer->move_to (match_positions[--match_length]);
|
buffer->move_to (match_positions[--cursor]);
|
||||||
|
|
||||||
const HBUINT32 &actionData = ligAction[action_idx];
|
const HBUINT32 &actionData = ligAction[action_idx];
|
||||||
if (unlikely (!actionData.sanitize (&c->sanitizer))) return false;
|
if (unlikely (!actionData.sanitize (&c->sanitizer))) return false;
|
||||||
|
@ -426,20 +428,21 @@ struct LigatureSubtable
|
||||||
if (unlikely (!ligatureData.sanitize (&c->sanitizer))) return false;
|
if (unlikely (!ligatureData.sanitize (&c->sanitizer))) return false;
|
||||||
hb_codepoint_t lig = ligatureData;
|
hb_codepoint_t lig = ligatureData;
|
||||||
|
|
||||||
match_positions[match_length++] = buffer->out_len;
|
|
||||||
buffer->replace_glyph (lig);
|
buffer->replace_glyph (lig);
|
||||||
|
|
||||||
//ligature_idx = 0; // XXX Yes or no?
|
/* Now go and delete all subsequent components. */
|
||||||
}
|
while (match_length - 1 > cursor)
|
||||||
else
|
{
|
||||||
{
|
buffer->move_to (match_positions[--match_length]);
|
||||||
buffer->skip_glyph ();
|
buffer->skip_glyph ();
|
||||||
end--;
|
end--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
action_idx++;
|
action_idx++;
|
||||||
}
|
}
|
||||||
while (!(action & LigActionLast));
|
while (!(action & LigActionLast));
|
||||||
|
match_length = 0;
|
||||||
buffer->move_to (end);
|
buffer->move_to (end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
tests/MORX-41.tests
|
||||||
|
|
||||||
# Non-Unicode cmap
|
# Non-Unicode cmap
|
||||||
tests/CMAP-3.tests
|
tests/CMAP-3.tests
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,6 @@ TESTS = \
|
||||||
tests/MORX-39.tests \
|
tests/MORX-39.tests \
|
||||||
tests/MORX-3.tests \
|
tests/MORX-3.tests \
|
||||||
tests/MORX-40.tests \
|
tests/MORX-40.tests \
|
||||||
tests/MORX-41.tests \
|
|
||||||
tests/MORX-4.tests \
|
tests/MORX-4.tests \
|
||||||
tests/MORX-5.tests \
|
tests/MORX-5.tests \
|
||||||
tests/MORX-6.tests \
|
tests/MORX-6.tests \
|
||||||
|
@ -74,6 +73,7 @@ TESTS = \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
DISBALED_TESTS = \
|
DISBALED_TESTS = \
|
||||||
|
tests/MORX-41.tests \
|
||||||
tests/CMAP-3.tests \
|
tests/CMAP-3.tests \
|
||||||
tests/SHARAN-1.tests \
|
tests/SHARAN-1.tests \
|
||||||
tests/SHBALI-1.tests \
|
tests/SHBALI-1.tests \
|
||||||
|
|
Loading…
Reference in New Issue