|
|
|
@ -191,27 +191,15 @@ struct hb_collect_variation_indices_context_t : |
|
|
|
|
static return_t default_return_value () { return hb_empty_t (); } |
|
|
|
|
|
|
|
|
|
hb_set_t *layout_variation_indices; |
|
|
|
|
hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> *varidx_delta_map; |
|
|
|
|
hb_vector_t<int> *normalized_coords; |
|
|
|
|
const VariationStore *var_store; |
|
|
|
|
const hb_set_t *glyph_set; |
|
|
|
|
const hb_map_t *gpos_lookups; |
|
|
|
|
float *store_cache; |
|
|
|
|
|
|
|
|
|
hb_collect_variation_indices_context_t (hb_set_t *layout_variation_indices_, |
|
|
|
|
hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> *varidx_delta_map_, |
|
|
|
|
hb_vector_t<int> *normalized_coords_, |
|
|
|
|
const VariationStore *var_store_, |
|
|
|
|
const hb_set_t *glyph_set_, |
|
|
|
|
const hb_map_t *gpos_lookups_, |
|
|
|
|
float *store_cache_) : |
|
|
|
|
const hb_map_t *gpos_lookups_) : |
|
|
|
|
layout_variation_indices (layout_variation_indices_), |
|
|
|
|
varidx_delta_map (varidx_delta_map_), |
|
|
|
|
normalized_coords (normalized_coords_), |
|
|
|
|
var_store (var_store_), |
|
|
|
|
glyph_set (glyph_set_), |
|
|
|
|
gpos_lookups (gpos_lookups_), |
|
|
|
|
store_cache (store_cache_) {} |
|
|
|
|
gpos_lookups (gpos_lookups_) {} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
template<typename OutputArray> |
|
|
|
@ -3984,17 +3972,7 @@ struct VariationDevice |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void collect_variation_index (hb_collect_variation_indices_context_t *c) const |
|
|
|
|
{ |
|
|
|
|
c->layout_variation_indices->add (varIdx); |
|
|
|
|
int delta = 0; |
|
|
|
|
if (c->normalized_coords && c->var_store) |
|
|
|
|
delta = roundf (c->var_store->get_delta (varIdx, c->normalized_coords->arrayZ, |
|
|
|
|
c->normalized_coords->length, c->store_cache)); |
|
|
|
|
|
|
|
|
|
/* set new varidx to HB_OT_LAYOUT_NO_VARIATIONS_INDEX here, will remap
|
|
|
|
|
* varidx later*/ |
|
|
|
|
c->varidx_delta_map->set (varIdx, hb_pair_t<unsigned, int> (HB_OT_LAYOUT_NO_VARIATIONS_INDEX, delta)); |
|
|
|
|
} |
|
|
|
|
{ c->layout_variation_indices->add (varIdx); } |
|
|
|
|
|
|
|
|
|
bool sanitize (hb_sanitize_context_t *c) const |
|
|
|
|
{ |
|
|
|
|