[subset] Don't drop anchor device tables when dropping hints. These may contain variation data.

Update subseting expected files to match latest version of fontTools.
This commit is contained in:
Garret Rieger 2021-04-22 15:18:35 -07:00
parent 6fddc2bbf9
commit 92757f6809
79 changed files with 9 additions and 11 deletions

View File

@ -491,20 +491,18 @@ struct Anchor
bool subset (hb_subset_context_t *c) const
{
TRACE_SUBSET (this);
if (c->plan->drop_hints)
{
// AnchorFormat 2 and 3 just containing extra hinting information, so
// if hints are being dropped convert to format 1.
if (u.format != 1 && u.format != 2 && u.format != 3)
return_trace (false);
return_trace (bool (reinterpret_cast<Anchor *> (u.format1.copy (c->serializer))));
}
switch (u.format) {
case 1: return_trace (bool (reinterpret_cast<Anchor *> (u.format1.copy (c->serializer))));
case 2: return_trace (bool (reinterpret_cast<Anchor *> (u.format2.copy (c->serializer))));
case 2:
if (c->plan->drop_hints)
{
// AnchorFormat 2 just containins extra hinting information, so
// if hints are being dropped convert to format 1.
return_trace (bool (reinterpret_cast<Anchor *> (u.format1.copy (c->serializer))));
}
return_trace (bool (reinterpret_cast<Anchor *> (u.format2.copy (c->serializer))));
case 3: return_trace (bool (reinterpret_cast<Anchor *> (u.format3.copy (c->serializer,
c->plan->layout_variation_idx_map))));
c->plan->layout_variation_idx_map))));
default:return_trace (false);
}
}