From b027cb518dc7e6ac7e41e617364476e3c7839792 Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Mon, 30 Mar 2020 18:47:22 +0100 Subject: [PATCH] Set sequence number when adding feature to aat map builder, to support stable sort. Fixes #2288. --- src/hb-aat-map.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hb-aat-map.cc b/src/hb-aat-map.cc index 9b5d97c74..6e9fbf1be 100644 --- a/src/hb-aat-map.cc +++ b/src/hb-aat-map.cc @@ -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