Set sequence number when adding feature to aat map builder, to support stable sort.

Fixes #2288.
This commit is contained in:
Jonathan Kew 2020-03-30 18:47:22 +01:00 committed by Ebrahim Byagowi
parent e0e7727064
commit b027cb518d

View File

@ -47,6 +47,7 @@ void hb_aat_map_builder_t::add_feature (hb_tag_t tag, unsigned value)
feature_info_t *info = features.push();
info->type = HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES;
info->setting = (hb_aat_layout_feature_selector_t) value;
info->seq = features.length;
return;
}
@ -57,6 +58,7 @@ void hb_aat_map_builder_t::add_feature (hb_tag_t tag, unsigned value)
feature_info_t *info = features.push();
info->type = mapping->aatFeatureType;
info->setting = value ? mapping->selectorToEnable : mapping->selectorToDisable;
info->seq = features.length;
}
void