[aat] Always generate a feature range
This commit is contained in:
parent
db4c874758
commit
c08308a83c
|
@ -85,14 +85,16 @@ void
|
||||||
hb_aat_map_builder_t::compile (hb_aat_map_t &m)
|
hb_aat_map_builder_t::compile (hb_aat_map_t &m)
|
||||||
{
|
{
|
||||||
/* Compute active features per range, and compile each. */
|
/* Compute active features per range, and compile each. */
|
||||||
if (features.length)
|
|
||||||
{
|
|
||||||
/* Sort features by start/end events. */
|
/* Sort features by start/end events. */
|
||||||
hb_vector_t<feature_event_t> feature_events;
|
hb_vector_t<feature_event_t> feature_events;
|
||||||
for (unsigned int i = 0; i < features.length; i++)
|
for (unsigned int i = 0; i < features.length; i++)
|
||||||
{
|
{
|
||||||
auto &feature = features[i];
|
auto &feature = features[i];
|
||||||
|
|
||||||
|
if (features[i].start == features[i].end)
|
||||||
|
continue;
|
||||||
|
|
||||||
feature_event_t *event;
|
feature_event_t *event;
|
||||||
|
|
||||||
event = feature_events.push ();
|
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.seq = features.length + 1;
|
||||||
|
|
||||||
feature_event_t *event = feature_events.push ();
|
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->start = false;
|
||||||
event->feature = feature;
|
event->feature = feature;
|
||||||
}
|
}
|
||||||
|
@ -160,7 +162,6 @@ hb_aat_map_builder_t::compile (hb_aat_map_t &m)
|
||||||
active_features.remove_ordered (feature - active_features.arrayZ);
|
active_features.remove_ordered (feature - active_features.arrayZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue