Lines Matching +full:- +full:- +full:auto +full:- +full:features
33 /* Variations of this code exist in hb-coretext-shape.cc as well
34 * as hb-aat-map.cc... */
42 hb_ms_feature_t *features; member
51 const auto *a = (const hb_ms_active_feature_t *) pa; in cmp()
52 const auto *b = (const hb_ms_active_feature_t *) pb; in cmp()
53 return a->fea.tag_le < b->fea.tag_le ? -1 : a->fea.tag_le > b->fea.tag_le ? 1 : in cmp()
54 a->order < b->order ? -1 : a->order > b->order ? 1 : in cmp()
55 a->fea.value < b->fea.value ? -1 : a->fea.value > b->fea.value ? 1 : in cmp()
69 const auto *a = (const hb_ms_feature_event_t *) pa; in cmp()
70 const auto *b = (const hb_ms_feature_event_t *) pb; in cmp()
71 return a->index < b->index ? -1 : a->index > b->index ? 1 : in cmp()
72 a->start < b->start ? -1 : a->start > b->start ? 1 : in cmp()
73 hb_ms_active_feature_t::cmp (&a->feature, &b->feature); in cmp()
78 hb_ms_features_t features; member
80 unsigned int index_last; /* == end - 1 */
84 hb_ms_setup_features (const hb_feature_t *features, in hb_ms_setup_features() argument
92 /* Sort features by start/end events. */ in hb_ms_setup_features()
97 feature.fea.tag_le = hb_uint32_swap (features[i].tag); in hb_ms_setup_features()
98 feature.fea.value = features[i].value; in hb_ms_setup_features()
104 event->index = features[i].start; in hb_ms_setup_features()
105 event->start = true; in hb_ms_setup_features()
106 event->feature = feature; in hb_ms_setup_features()
109 event->index = features[i].end; in hb_ms_setup_features()
110 event->start = false; in hb_ms_setup_features()
111 event->feature = feature; in hb_ms_setup_features()
121 auto *event = feature_events.push (); in hb_ms_setup_features()
122 event->index = 0; /* This value does magic. */ in hb_ms_setup_features()
123 event->start = false; in hb_ms_setup_features()
124 event->feature = feature; in hb_ms_setup_features()
127 /* Scan events and save features for each range. */ in hb_ms_setup_features()
132 auto *event = &feature_events[i]; in hb_ms_setup_features()
134 if (event->index != last_index) in hb_ms_setup_features()
136 /* Save a snapshot of active features and the range. */ in hb_ms_setup_features()
137 auto *range = range_records.push (); in hb_ms_setup_features()
138 auto offset = feature_records.length; in hb_ms_setup_features()
143 … if (!j || active_features[j].fea.tag_le != feature_records[feature_records.length - 1].tag_le) in hb_ms_setup_features()
150 feature_records[feature_records.length - 1].value = active_features[j].fea.value; in hb_ms_setup_features()
156 range->features.features = reinterpret_cast<hb_ms_feature_t *> (offset); in hb_ms_setup_features()
157 range->features.num_features = feature_records.length - offset; in hb_ms_setup_features()
158 range->index_first = last_index; in hb_ms_setup_features()
159 range->index_last = event->index - 1; in hb_ms_setup_features()
161 last_index = event->index; in hb_ms_setup_features()
164 if (event->start) in hb_ms_setup_features()
166 active_features.push (event->feature); in hb_ms_setup_features()
170 auto *feature = active_features.lsearch (event->feature); in hb_ms_setup_features()
172 active_features.remove_ordered (feature - active_features.arrayZ); in hb_ms_setup_features()
182 auto *range = &range_records[i]; in hb_ms_setup_features()
183 …range->features.features = (hb_ms_feature_t *) feature_records + reinterpret_cast<uintptr_t> (rang… in hb_ms_setup_features()
201 auto *last_range = &range_records[0]; in hb_ms_make_feature_ranges()
204 auto *range = last_range; in hb_ms_make_feature_ranges()
205 while (log_clusters[i] < range->index_first) in hb_ms_make_feature_ranges()
206 range--; in hb_ms_make_feature_ranges()
207 while (log_clusters[i] > range->index_last) in hb_ms_make_feature_ranges()
210 &range->features != range_features[range_features.length - 1]) in hb_ms_make_feature_ranges()
212 auto **features = range_features.push (); in hb_ms_make_feature_ranges() local
213 auto *c = range_counts.push (); in hb_ms_make_feature_ranges()
214 if (unlikely (!features || !c)) in hb_ms_make_feature_ranges()
220 *features = &range->features; in hb_ms_make_feature_ranges()
225 range_counts[range_counts.length - 1]++; in hb_ms_make_feature_ranges()