[ligature-cache] Handle case of ligature with no components (#5500)

In the cache with "seconds" set-digest.
This commit is contained in:
Behdad Esfahbod authored and GitHub committed 2025-08-25 14:02:59 -06:00
1 parent 724ae78d4c
commit 6b62d3678b
1 file changed
+7 -1
+7 -1
View File
@@ -47,7 +47,13 @@ struct Ligature
template <typename set_t>
void collect_second (set_t &s) const
{
s.add (component[1]); // This adds codepoint 0 if component array is empty.
if (unlikely (!component.get_length ()))
{
// A ligature without any components. Anything matches.
s = set_t::full ();
return;
}
s.add (component.arrayZ[0]);
}
bool would_apply (hb_would_apply_context_t *c) const