|
|
|
@ -131,20 +131,17 @@ struct PairPosFormat1_3 |
|
|
|
|
auto *out = c->serializer->start_embed (*this); |
|
|
|
|
if (unlikely (!c->serializer->extend_min (out))) return_trace (false); |
|
|
|
|
out->format = format; |
|
|
|
|
out->valueFormat[0] = valueFormat[0]; |
|
|
|
|
out->valueFormat[1] = valueFormat[1]; |
|
|
|
|
|
|
|
|
|
hb_pair_t<unsigned, unsigned> newFormats = hb_pair (valueFormat[0], valueFormat[1]); |
|
|
|
|
|
|
|
|
|
if (c->plan->normalized_coords) |
|
|
|
|
newFormats = compute_effective_value_formats (glyphset, &c->plan->layout_variation_idx_delta_map); |
|
|
|
|
|
|
|
|
|
if (c->plan->flags & HB_SUBSET_FLAGS_NO_HINTING) |
|
|
|
|
{ |
|
|
|
|
hb_pair_t<unsigned, unsigned> newFormats = compute_effective_value_formats (glyphset); |
|
|
|
|
out->valueFormat[0] = newFormats.first; |
|
|
|
|
out->valueFormat[1] = newFormats.second; |
|
|
|
|
} |
|
|
|
|
newFormats = compute_effective_value_formats (glyphset); |
|
|
|
|
|
|
|
|
|
if (c->plan->all_axes_pinned) |
|
|
|
|
{ |
|
|
|
|
out->valueFormat[0] = out->valueFormat[0].drop_device_table_flags (); |
|
|
|
|
out->valueFormat[1] = out->valueFormat[1].drop_device_table_flags (); |
|
|
|
|
} |
|
|
|
|
out->valueFormat[0] = newFormats.first; |
|
|
|
|
out->valueFormat[1] = newFormats.second; |
|
|
|
|
|
|
|
|
|
hb_sorted_vector_t<hb_codepoint_t> new_coverage; |
|
|
|
|
|
|
|
|
@ -175,7 +172,8 @@ struct PairPosFormat1_3 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hb_pair_t<unsigned, unsigned> compute_effective_value_formats (const hb_set_t& glyphset) const |
|
|
|
|
hb_pair_t<unsigned, unsigned> compute_effective_value_formats (const hb_set_t& glyphset, |
|
|
|
|
const hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> *varidx_delta_map = nullptr) const |
|
|
|
|
{ |
|
|
|
|
unsigned record_size = PairSet::get_size (valueFormat); |
|
|
|
|
|
|
|
|
@ -195,8 +193,16 @@ struct PairPosFormat1_3 |
|
|
|
|
{ |
|
|
|
|
if (record->intersects (glyphset)) |
|
|
|
|
{ |
|
|
|
|
format1 = format1 | valueFormat[0].get_effective_format (record->get_values_1 ()); |
|
|
|
|
format2 = format2 | valueFormat[1].get_effective_format (record->get_values_2 (valueFormat[0])); |
|
|
|
|
if (!varidx_delta_map) |
|
|
|
|
{ |
|
|
|
|
format1 = format1 | valueFormat[0].get_effective_format (record->get_values_1 ()); |
|
|
|
|
format2 = format2 | valueFormat[1].get_effective_format (record->get_values_2 (valueFormat[0])); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
format1 = format1 | valueFormat[0].update_var_device_table_flags (record->get_values_1 (), &set, varidx_delta_map); |
|
|
|
|
format2 = format2 | valueFormat[1].update_var_device_table_flags (record->get_values_2 (valueFormat[0]), &set, varidx_delta_map); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
record = &StructAtOffset<const PairValueRecord> (record, record_size); |
|
|
|
|
} |
|
|
|
|