[subset] add comment for why we retain empty lookups.
This commit is contained in:
parent
70e2de2bd4
commit
83769b9cb1
|
@ -1388,6 +1388,12 @@ struct Lookup
|
||||||
outMarkFilteringSet = markFilteringSet;
|
outMarkFilteringSet = markFilteringSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Always keep the lookup even if it's empty. The rest of layout subsetting depends on lookup
|
||||||
|
// indices being consistent with those computed during planning. So if an empty lookup is
|
||||||
|
// discarded during the subset phase it will invalidate all subsequent lookup indices.
|
||||||
|
// Generally we shouldn't end up with an empty lookup as we pre-prune them during the planning
|
||||||
|
// phase, but it can happen in rare cases such as when during closure subtable is considered
|
||||||
|
// degenerate (see: https://github.com/harfbuzz/harfbuzz/issues/3853)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue