|
@@ -163,7 +163,7 @@ struct hb_closure_context_t :
|
|
|
hb_set_t *glyphs_,
|
|
|
hb_set_t *cur_intersected_glyphs_,
|
|
|
hb_map_t *done_lookups_glyph_count_,
|
|
|
- hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *done_lookups_glyph_set_,
|
|
|
+ hb_hashmap_t<unsigned, hb_set_t *> *done_lookups_glyph_set_,
|
|
|
unsigned int nesting_level_left_ = HB_MAX_NESTING_LEVEL) :
|
|
|
face (face_),
|
|
|
glyphs (glyphs_),
|
|
@@ -192,7 +192,7 @@ struct hb_closure_context_t :
|
|
|
|
|
|
private:
|
|
|
hb_map_t *done_lookups_glyph_count;
|
|
|
- hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *done_lookups_glyph_set;
|
|
|
+ hb_hashmap_t<unsigned, hb_set_t *> *done_lookups_glyph_set;
|
|
|
unsigned int lookup_count;
|
|
|
};
|
|
|
|
|
@@ -1642,9 +1642,8 @@ struct Rule
|
|
|
const hb_map_t *klass_map = nullptr) const
|
|
|
{
|
|
|
TRACE_SUBSET (this);
|
|
|
-
|
|
|
- const hb_array_t<const HBUINT16> input = inputZ.as_array ((inputCount ? inputCount - 1 : 0));
|
|
|
- if (!input.length) return_trace (false);
|
|
|
+ if (unlikely (!inputCount)) return_trace (false);
|
|
|
+ const hb_array_t<const HBUINT16> input = inputZ.as_array (inputCount - 1);
|
|
|
|
|
|
const hb_map_t *mapping = klass_map == nullptr ? c->plan->glyph_map : klass_map;
|
|
|
if (!hb_all (input, mapping)) return_trace (false);
|
|
@@ -3631,7 +3630,7 @@ struct GSUBGPOS
|
|
|
}
|
|
|
|
|
|
void prune_langsys (const hb_map_t *duplicate_feature_map,
|
|
|
- hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *script_langsys_map,
|
|
|
+ hb_hashmap_t<unsigned, hb_set_t *> *script_langsys_map,
|
|
|
hb_set_t *new_feature_indexes /* OUT */) const
|
|
|
{
|
|
|
hb_prune_langsys_context_t c (this, script_langsys_map, duplicate_feature_map, new_feature_indexes);
|
|
@@ -3689,7 +3688,7 @@ struct GSUBGPOS
|
|
|
hb_map_t *duplicate_feature_map /* OUT */) const
|
|
|
{
|
|
|
if (feature_indices->is_empty ()) return;
|
|
|
- hb_hashmap_t<hb_tag_t, hb_set_t *, (unsigned)-1, nullptr> unique_features;
|
|
|
+ hb_hashmap_t<hb_tag_t, hb_set_t *> unique_features;
|
|
|
//find out duplicate features after subset
|
|
|
for (unsigned i : feature_indices->iter ())
|
|
|
{
|
|
@@ -3784,8 +3783,12 @@ struct GSUBGPOS
|
|
|
// http://lists.freedesktop.org/archives/harfbuzz/2012-November/002660.html
|
|
|
continue;
|
|
|
|
|
|
- if (f.featureParams.is_null ()
|
|
|
- && !f.intersects_lookup_indexes (lookup_indices)
|
|
|
+
|
|
|
+ if (!f.featureParams.is_null () &&
|
|
|
+ tag == HB_TAG ('s', 'i', 'z', 'e'))
|
|
|
+ continue;
|
|
|
+
|
|
|
+ if (!f.intersects_lookup_indexes (lookup_indices)
|
|
|
#ifndef HB_NO_VAR
|
|
|
&& !alternate_feature_indices.has (i)
|
|
|
#endif
|