[aat] Always generate a feature range

This commit is contained in:
Behdad Esfahbod 2023-01-09 21:42:19 -07:00
parent db4c874758
commit c08308a83c
1 changed files with 69 additions and 68 deletions

View File

@ -85,14 +85,16 @@ void
hb_aat_map_builder_t::compile (hb_aat_map_t &m)
{
/* Compute active features per range, and compile each. */
if (features.length)
{
/* Sort features by start/end events. */
hb_vector_t<feature_event_t> feature_events;
for (unsigned int i = 0; i < features.length; i++)
{
auto &feature = features[i];
if (features[i].start == features[i].end)
continue;
feature_event_t *event;
event = feature_events.push ();
@ -112,7 +114,7 @@ hb_aat_map_builder_t::compile (hb_aat_map_t &m)
feature.seq = features.length + 1;
feature_event_t *event = feature_events.push ();
event->index = 0; /* This value does magic. */
event->index = -1; /* This value does magic. */
event->start = false;
event->feature = feature;
}
@ -161,7 +163,6 @@ hb_aat_map_builder_t::compile (hb_aat_map_t &m)
}
}
}
}
#endif