diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index a1ff423ca..406771fe8 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -328,10 +328,6 @@ struct OffsetTo : Offset hb_enable_if (hb_is_convertible (Base, void *))> friend Type& operator + (OffsetTo &offset, Base &&base) { return offset ((void *) base); } - Type& serialize (hb_serialize_context_t *c, const void *base) - { - return * (Type *) Offset::serialize (c, base); - } template bool serialize_subset (hb_subset_context_t *c, const OffsetTo& src, diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 0fc66d2cb..c78f82055 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -2790,8 +2790,8 @@ struct VariationStore (src+src->dataSets[i]).collect_region_refs (region_map, inner_maps[i]); region_map.sort (); - if (unlikely (!regions.serialize (c, this) - .serialize (c, &(src+src->regions), region_map))) return_trace (false); + if (unlikely (!regions.serialize_serialize (c, &(src+src->regions), region_map))) + return_trace (false); /* TODO: The following code could be simplified when * List16OfOffset16To::subset () can take a custom param to be passed to VarData::serialize () @@ -2801,8 +2801,8 @@ struct VariationStore for (unsigned int i = 0; i < inner_maps.length; i++) { if (inner_maps[i].get_population () == 0) continue; - if (unlikely (!dataSets[set_index++].serialize (c, this) - .serialize (c, &(src+src->dataSets[i]), inner_maps[i], region_map))) + if (unlikely (!dataSets[set_index++] + .serialize_serialize (c, &(src+src->dataSets[i]), inner_maps[i], region_map))) return_trace (false); } diff --git a/src/hb-ot-var-hvar-table.hh b/src/hb-ot-var-hvar-table.hh index 62bd1aa68..4d7f2ed91 100644 --- a/src/hb-ot-var-hvar-table.hh +++ b/src/hb-ot-var-hvar-table.hh @@ -367,15 +367,15 @@ struct HVARVVAR TRACE_SERIALIZE (this); if (im_plans[index_map_subset_plan_t::ADV_INDEX].is_identity ()) advMap = 0; - else if (unlikely (!advMap.serialize (c, this).serialize (c, im_plans[index_map_subset_plan_t::ADV_INDEX]))) + else if (unlikely (!advMap.serialize_serialize (c, im_plans[index_map_subset_plan_t::ADV_INDEX]))) return_trace (false); if (im_plans[index_map_subset_plan_t::LSB_INDEX].is_identity ()) lsbMap = 0; - else if (unlikely (!lsbMap.serialize (c, this).serialize (c, im_plans[index_map_subset_plan_t::LSB_INDEX]))) + else if (unlikely (!lsbMap.serialize_serialize (c, im_plans[index_map_subset_plan_t::LSB_INDEX]))) return_trace (false); if (im_plans[index_map_subset_plan_t::RSB_INDEX].is_identity ()) rsbMap = 0; - else if (unlikely (!rsbMap.serialize (c, this).serialize (c, im_plans[index_map_subset_plan_t::RSB_INDEX]))) + else if (unlikely (!rsbMap.serialize_serialize (c, im_plans[index_map_subset_plan_t::RSB_INDEX]))) return_trace (false); return_trace (true); @@ -398,8 +398,10 @@ struct HVARVVAR out->version.major = 1; out->version.minor = 0; - if (unlikely (!out->varStore.serialize (c->serializer, out) - .serialize (c->serializer, hvar_plan.var_store, hvar_plan.inner_maps.as_array ()))) + if (unlikely (!out->varStore + .serialize_serialize (c->serializer, + hvar_plan.var_store, + hvar_plan.inner_maps.as_array ()))) return_trace (false); return_trace (out->T::serialize_index_maps (c->serializer, @@ -466,7 +468,7 @@ struct VVAR : HVARVVAR { return_trace (false); if (!im_plans[index_map_subset_plan_t::VORG_INDEX].get_map_count ()) vorgMap = 0; - else if (unlikely (!vorgMap.serialize (c, this).serialize (c, im_plans[index_map_subset_plan_t::VORG_INDEX]))) + else if (unlikely (!vorgMap.serialize_serialize (c, im_plans[index_map_subset_plan_t::VORG_INDEX]))) return_trace (false); return_trace (true); diff --git a/test/api/fonts/AdobeVFPrototype.abc.otf b/test/api/fonts/AdobeVFPrototype.abc.otf index 5e6a92844..0e403a648 100644 Binary files a/test/api/fonts/AdobeVFPrototype.abc.otf and b/test/api/fonts/AdobeVFPrototype.abc.otf differ diff --git a/test/api/fonts/AdobeVFPrototype.ac.nohints.otf b/test/api/fonts/AdobeVFPrototype.ac.nohints.otf index 19b78973b..55ab49592 100644 Binary files a/test/api/fonts/AdobeVFPrototype.ac.nohints.otf and b/test/api/fonts/AdobeVFPrototype.ac.nohints.otf differ diff --git a/test/api/fonts/AdobeVFPrototype.ac.nosubrs.nohints.otf b/test/api/fonts/AdobeVFPrototype.ac.nosubrs.nohints.otf index 73ff87984..5533baa38 100644 Binary files a/test/api/fonts/AdobeVFPrototype.ac.nosubrs.nohints.otf and b/test/api/fonts/AdobeVFPrototype.ac.nosubrs.nohints.otf differ diff --git a/test/api/fonts/AdobeVFPrototype.ac.nosubrs.otf b/test/api/fonts/AdobeVFPrototype.ac.nosubrs.otf index 7d2f79a7b..d90f3efb8 100644 Binary files a/test/api/fonts/AdobeVFPrototype.ac.nosubrs.otf and b/test/api/fonts/AdobeVFPrototype.ac.nosubrs.otf differ diff --git a/test/api/fonts/AdobeVFPrototype.ac.otf b/test/api/fonts/AdobeVFPrototype.ac.otf index 193404fa5..96eb2ebc1 100644 Binary files a/test/api/fonts/AdobeVFPrototype.ac.otf and b/test/api/fonts/AdobeVFPrototype.ac.otf differ diff --git a/test/api/fonts/AdobeVFPrototype.ac.retaingids.otf b/test/api/fonts/AdobeVFPrototype.ac.retaingids.otf index 15419b04d..8ff99c625 100644 Binary files a/test/api/fonts/AdobeVFPrototype.ac.retaingids.otf and b/test/api/fonts/AdobeVFPrototype.ac.retaingids.otf differ diff --git a/test/api/fonts/SourceSansVariable-Roman-modHVAR.abc.ttf b/test/api/fonts/SourceSansVariable-Roman-modHVAR.abc.ttf index 397e7a547..09b13c57a 100644 Binary files a/test/api/fonts/SourceSansVariable-Roman-modHVAR.abc.ttf and b/test/api/fonts/SourceSansVariable-Roman-modHVAR.abc.ttf differ diff --git a/test/api/fonts/SourceSansVariable-Roman-modHVAR.ac.ttf b/test/api/fonts/SourceSansVariable-Roman-modHVAR.ac.ttf index cfdbe1de7..706504521 100644 Binary files a/test/api/fonts/SourceSansVariable-Roman-modHVAR.ac.ttf and b/test/api/fonts/SourceSansVariable-Roman-modHVAR.ac.ttf differ diff --git a/test/api/fonts/SourceSansVariable-Roman.abc.ttf b/test/api/fonts/SourceSansVariable-Roman.abc.ttf index 690d7d539..dbbc388f6 100644 Binary files a/test/api/fonts/SourceSansVariable-Roman.abc.ttf and b/test/api/fonts/SourceSansVariable-Roman.abc.ttf differ diff --git a/test/api/fonts/SourceSansVariable-Roman.ac.retaingids.ttf b/test/api/fonts/SourceSansVariable-Roman.ac.retaingids.ttf index b2e744df2..9f9ecd631 100644 Binary files a/test/api/fonts/SourceSansVariable-Roman.ac.retaingids.ttf and b/test/api/fonts/SourceSansVariable-Roman.ac.retaingids.ttf differ diff --git a/test/api/fonts/SourceSansVariable-Roman.ac.ttf b/test/api/fonts/SourceSansVariable-Roman.ac.ttf index 2387ea776..c12daf25f 100644 Binary files a/test/api/fonts/SourceSansVariable-Roman.ac.ttf and b/test/api/fonts/SourceSansVariable-Roman.ac.ttf differ diff --git a/test/api/fonts/SourceSerifVariable-Roman-VVAR.abc.ttf b/test/api/fonts/SourceSerifVariable-Roman-VVAR.abc.ttf index 7d94abcb0..7ad8a8c64 100644 Binary files a/test/api/fonts/SourceSerifVariable-Roman-VVAR.abc.ttf and b/test/api/fonts/SourceSerifVariable-Roman-VVAR.abc.ttf differ diff --git a/test/api/fonts/SourceSerifVariable-Roman-VVAR.ac.retaingids.ttf b/test/api/fonts/SourceSerifVariable-Roman-VVAR.ac.retaingids.ttf index 734f6e82a..a535734f3 100644 Binary files a/test/api/fonts/SourceSerifVariable-Roman-VVAR.ac.retaingids.ttf and b/test/api/fonts/SourceSerifVariable-Roman-VVAR.ac.retaingids.ttf differ diff --git a/test/api/fonts/SourceSerifVariable-Roman-VVAR.ac.ttf b/test/api/fonts/SourceSerifVariable-Roman-VVAR.ac.ttf index b6b9e9715..8326bec08 100644 Binary files a/test/api/fonts/SourceSerifVariable-Roman-VVAR.ac.ttf and b/test/api/fonts/SourceSerifVariable-Roman-VVAR.ac.ttf differ