From 49d6ba3fa44696e6fec10cee6f6e366199662622 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 2 Oct 2026 14:14:29 -0600 Subject: [PATCH] [subset] Preserve precision in variable layout conditions Partial instancing rounds the default and surviving deltas of format-2 layout conditions independently, moving their Boolean boundary and changing GSUB or GPOS lookup selection. Rescale variable conditions into private variation-store rows before integer encoding, leaving shared positioning values unchanged. Prefer exact integers; otherwise use the available signed 32-bit precision. Carry defaults outside int16 in a neutral variation region. Keep source values separate from output mappings so serialization retries start with the original condition, and make private-row order independent of source addresses. Propagate store-instancing failures to the serializer. Add legacy and additive feature-variation fixtures covering nested conditions, fractional coefficients, large defaults, shared positioning rows, and a second instancing pass. Tested: full Meson suite with and without experimental API (279 passed; 261 passed and 1 skipped respectively), C++11 reduced-feature syntax checks, and C++11 sanitizer builds with failing allocation checks. Assisted-by: OpenAI Codex --- src/OT/Layout/GDEF/GDEF.hh | 24 +-- src/hb-ot-layout-common.hh | 48 +++++- src/hb-ot-var-common.hh | 120 ++++++++++++++- src/hb-subset-plan-layout.cc | 3 + src/hb-subset-plan-member-list.hh | 5 + ...-variation-precision-GPOS-legacy-large.ttf | Bin 0 -> 1368 bytes ...-variation-precision-GPOS-legacy-third.ttf | Bin 0 -> 1364 bytes ...eature-variation-precision-GPOS-legacy.ttf | Bin 0 -> 1364 bytes ...-variation-precision-GPOS-lookup-large.ttf | Bin 0 -> 1372 bytes ...-variation-precision-GPOS-lookup-third.ttf | Bin 0 -> 1368 bytes ...eature-variation-precision-GPOS-lookup.ttf | Bin 0 -> 1368 bytes ...-variation-precision-GSUB-legacy-large.ttf | Bin 0 -> 1372 bytes ...-variation-precision-GSUB-legacy-third.ttf | Bin 0 -> 1368 bytes ...eature-variation-precision-GSUB-legacy.ttf | Bin 0 -> 1368 bytes ...-variation-precision-GSUB-lookup-large.ttf | Bin 0 -> 1372 bytes ...-variation-precision-GSUB-lookup-third.ttf | Bin 0 -> 1368 bytes ...eature-variation-precision-GSUB-lookup.ttf | Bin 0 -> 1368 bytes .../generate-layout-condition-precision.py | 141 ++++++++++++++++++ test/api/test-subset.c | 61 ++++++++ 19 files changed, 382 insertions(+), 20 deletions(-) create mode 100644 test/api/fonts/feature-variation-precision-GPOS-legacy-large.ttf create mode 100644 test/api/fonts/feature-variation-precision-GPOS-legacy-third.ttf create mode 100644 test/api/fonts/feature-variation-precision-GPOS-legacy.ttf create mode 100644 test/api/fonts/feature-variation-precision-GPOS-lookup-large.ttf create mode 100644 test/api/fonts/feature-variation-precision-GPOS-lookup-third.ttf create mode 100644 test/api/fonts/feature-variation-precision-GPOS-lookup.ttf create mode 100644 test/api/fonts/feature-variation-precision-GSUB-legacy-large.ttf create mode 100644 test/api/fonts/feature-variation-precision-GSUB-legacy-third.ttf create mode 100644 test/api/fonts/feature-variation-precision-GSUB-legacy.ttf create mode 100644 test/api/fonts/feature-variation-precision-GSUB-lookup-large.ttf create mode 100644 test/api/fonts/feature-variation-precision-GSUB-lookup-third.ttf create mode 100644 test/api/fonts/feature-variation-precision-GSUB-lookup.ttf create mode 100644 test/api/fonts/generate-layout-condition-precision.py diff --git a/src/OT/Layout/GDEF/GDEF.hh b/src/OT/Layout/GDEF/GDEF.hh index 5c7198dde..e82210ba8 100644 --- a/src/OT/Layout/GDEF/GDEF.hh +++ b/src/OT/Layout/GDEF/GDEF.hh @@ -696,17 +696,20 @@ struct GDEF if (varStore) { item_variations_t item_vars; - if (item_vars.instantiate (this+varStore, c->plan, true, true, - c->plan->gdef_varstore_inner_maps.as_array ())) { - subset_varstore = out->varStore.serialize_serialize (c->serializer, - item_vars.has_long_word (), - c->plan->axis_tags, - item_vars.get_region_list (), - item_vars.get_vardata_encodings ()); - varstore_index = c->serializer->last_added_child_index(); - } + if (unlikely (!c->serializer->check_success ( + item_vars.instantiate (this+varStore, c->plan, true, true, + c->plan->gdef_varstore_inner_maps.as_array (), true)))) + return_trace (false); + subset_varstore = out->varStore.serialize_serialize (c->serializer, + item_vars.has_long_word (), + c->plan->axis_tags, + item_vars.get_region_list (), + item_vars.get_vardata_encodings ()); + varstore_index = c->serializer->last_added_child_index(); remap_varidx_after_instantiation (item_vars.get_varidx_map (), c->plan->layout_variation_idx_delta_map); + remap_varidx_after_instantiation (item_vars.get_varidx_map (), + c->plan->layout_condition_idx_value_map); } } else @@ -1116,8 +1119,9 @@ struct GDEF } protected: + template static void remap_varidx_after_instantiation (const hb_map_t& varidx_map, - hb_hashmap_t>& layout_variation_idx_delta_map /* IN/OUT */) + hb_hashmap_t>& layout_variation_idx_delta_map /* IN/OUT */) { /* varidx_map is empty which means varstore is empty after instantiation, * no variations, map all varidx to HB_OT_LAYOUT_NO_VARIATIONS_INDEX. diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 9a72c3acf..2e3f463d3 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -218,6 +218,7 @@ struct hb_collect_variation_indices_context_t : hb_set_t *layout_variation_indices; const hb_set_t *glyph_set; const hb_map_t *gpos_lookups; + hb_hashmap_t> *condition_values = nullptr; hb_collect_variation_indices_context_t (hb_set_t *layout_variation_indices_, const hb_set_t *glyph_set_, @@ -4392,6 +4393,14 @@ struct ConditionValue if (varIdx == VarIdx::NO_VARIATION) return_trace (true); + hb_pair_t *condition_value; + if (c->plan->layout_condition_idx_value_map.has (this, &condition_value)) + { + out->defaultValue = condition_value->second; + out->varIdx = condition_value->first; + return_trace (true); + } + hb_pair_t *new_varidx_delta; if (!c->plan->layout_variation_idx_delta_map.has (varIdx, &new_varidx_delta)) return_trace (false); @@ -4705,7 +4714,8 @@ struct Condition } bool collect_var_indices (hb_set_t *var_indices, - unsigned depth = HB_MAX_NESTING_LEVEL) const; + unsigned depth = HB_MAX_NESTING_LEVEL, + hb_hashmap_t> *condition_values = nullptr) const; bool serialize (hb_serialize_context_t *c, const Condition *src, @@ -4779,7 +4789,8 @@ struct ConditionList }; inline bool -Condition::collect_var_indices (hb_set_t *var_indices, unsigned depth) const +Condition::collect_var_indices (hb_set_t *var_indices, unsigned depth, + hb_hashmap_t> *condition_values) const { if (unlikely (!depth)) return false; switch (u.format.v) @@ -4789,23 +4800,29 @@ Condition::collect_var_indices (hb_set_t *var_indices, unsigned depth) const return true; case 2: if (u.format2.varIdx != VarIdx::NO_VARIATION) - var_indices->add (u.format2.varIdx); + { + var_indices->add (u.format2.varIdx); + if (condition_values && + !condition_values->set (&u.format2, + hb_pair (unsigned (u.format2.varIdx), int (u.format2.defaultValue)))) + return false; + } return !var_indices->in_error (); case 3: for (const auto &offset : u.format3.conditions) if (unlikely (!(&u.format3+offset).collect_var_indices (var_indices, - depth - 1))) + depth - 1, condition_values))) return false; return true; case 4: for (const auto &offset : u.format4.conditions) if (unlikely (!(&u.format4+offset).collect_var_indices (var_indices, - depth - 1))) + depth - 1, condition_values))) return false; return true; case 5: return (&u.format5+u.format5.condition).collect_var_indices (var_indices, - depth - 1); + depth - 1, condition_values); default: return false; } @@ -5008,6 +5025,17 @@ Condition::subset_lookup_condition_impl (hb_subset_context_t *c, LOOKUP_CONDITION_SUBSET_TRUE : LOOKUP_CONDITION_SUBSET_FALSE); + hb_pair_t *condition_value; + if (c->plan->layout_condition_idx_value_map.has (&src, &condition_value)) + { + out->defaultValue = condition_value->second; + out->varIdx = condition_value->first; + if (out->varIdx == VarIdx::NO_VARIATION) + return out->defaultValue > 0 ? LOOKUP_CONDITION_SUBSET_TRUE : + LOOKUP_CONDITION_SUBSET_FALSE; + return LOOKUP_CONDITION_SUBSET_KEEP; + } + hb_pair_t *new_varidx_delta; if (!c->plan->layout_variation_idx_delta_map.has (src.varIdx, &new_varidx_delta)) @@ -5235,7 +5263,9 @@ struct ConditionSet void collect_variation_indices (hb_collect_variation_indices_context_t *c) const { for (const auto &offset : conditions) - if (unlikely (!(this+offset).collect_var_indices (c->layout_variation_indices))) + if (unlikely (!(this+offset).collect_var_indices (c->layout_variation_indices, + HB_MAX_NESTING_LEVEL, + c->condition_values))) c->layout_variation_indices->err (); } @@ -5553,7 +5583,9 @@ struct LookupConditionRecord void collect_variation_indices (hb_collect_variation_indices_context_t *c, const void *base) const { - if (unlikely (!(base+condition).collect_var_indices (c->layout_variation_indices))) + if (unlikely (!(base+condition).collect_var_indices (c->layout_variation_indices, + HB_MAX_NESTING_LEVEL, + c->condition_values))) c->layout_variation_indices->err (); } diff --git a/src/hb-ot-var-common.hh b/src/hb-ot-var-common.hh index 425cd1af6..27435b907 100644 --- a/src/hb-ot-var-common.hh +++ b/src/hb-ot-var-common.hh @@ -1851,7 +1851,8 @@ struct item_variations_t const hb_subset_plan_t *plan, bool optimize=true, bool use_no_variation_idx=true, - const hb_array_t inner_maps = hb_array_t ()) + const hb_array_t inner_maps = hb_array_t (), + bool layout_conditions = false) { if (!create_from_item_varstore (varStore, plan->axes_old_index_tag_map, inner_maps)) return false; @@ -1859,11 +1860,126 @@ struct item_variations_t if (plan->has_avar2 && plan->avar2_reachable_ranges.get_population ()) for (tuple_variations_t& tuple_vars : vars) tuple_vars.cull_unreachable (plan->avar2_reachable_ranges); - if (!instantiate_tuple_vars (plan->axes_location, plan->axes_triple_distances)) + if (!instantiate_tuple_vars (plan->axes_location, plan->axes_triple_distances, + !layout_conditions)) + return false; + if (layout_conditions && + (!instantiate_condition_values (plan, varStore) || !build_region_list ())) return false; return as_item_varstore (optimize, use_no_variation_idx); } + bool instantiate_condition_values (const hb_subset_plan_t *plan, + const ItemVariationStore &varStore) + { + // GDEF serialization can be retried; always start from the source values. + auto &condition_map = plan->layout_condition_idx_value_map; + condition_map.clear (); + if (!plan->layout_condition_values) return true; + using condition_value_t = hb_pair_t>; + hb_vector_t conditions; + for (auto condition : plan->layout_condition_values.iter ()) + conditions.push (condition); + if (unlikely (conditions.in_error ())) return false; + // Row order must not depend on the addresses of the source conditions. + conditions.qsort ([] (const condition_value_t &a, const condition_value_t &b) { + if (a.second.first != b.second.first) + return a.second.first < b.second.first ? -1 : 1; + return a.second.second < b.second.second ? -1 : + a.second.second > b.second.second ? 1 : 0; + }); + hb_map_t outer_map; + unsigned new_outer = 0; + for (unsigned i = 0; i < plan->gdef_varstore_inner_maps.length; i++) + if (plan->gdef_varstore_inner_maps[i].get_population ()) + if (!outer_map.set (i, new_outer++)) return false; + for (auto condition : conditions) + { + unsigned old_idx = condition.second.first; + float value = condition.second.second + + varStore.get_delta (old_idx, plan->normalized_coords.as_array ()); + unsigned old_outer = old_idx >> 16; + if (!outer_map.has (old_outer)) + continue; + unsigned outer = outer_map.get (old_outer); + unsigned inner = plan->gdef_varstore_inner_maps[old_outer].get (old_idx & 0xFFFF); + unsigned idx = (outer << 16) | inner; + if (outer >= vars.length || inner >= var_data_num_rows[outer]) + continue; + + double maximum = fabs ((double) value); + bool variable = false; + for (const tuple_delta_t &tuple : vars[outer].tuple_vars) + { + if (unlikely (inner >= tuple.deltas_x.length)) return false; + float delta = tuple.deltas_x[inner]; + variable |= delta != 0.f; + maximum = hb_max (maximum, fabs ((double) delta)); + } + if (!variable) + { + if (!condition_map.set (condition.first, + hb_pair (unsigned (VarIdx::NO_VARIATION), int (value > 0)))) + return false; + continue; + } + + double scale = 1.; + while (maximum * scale > INT_MAX) + scale *= .5; + // Positive rescaling preserves the Boolean boundary. Prefer exact + // integers, otherwise use the available 32-bit precision. + while (maximum * scale * 2 <= INT_MAX) + { + bool integral = (double) value * scale == round ((double) value * scale); + for (const tuple_delta_t &tuple : vars[outer].tuple_vars) + integral &= (double) tuple.deltas_x[inner] * scale == + round ((double) tuple.deltas_x[inner] * scale); + if (integral) break; + scale *= 2; + } + int default_value = (int) round ((double) value * scale); + if (scale != 1. || default_value < -32768 || default_value > 32767) + { + // A condition may share its row with a positioning value. Give it a + // private copy before integer rounding discards fractional deltas. + tuple_variations_t private_row; + for (const tuple_delta_t &tuple : vars[outer].tuple_vars) + { + if (!tuple.deltas_x[inner]) continue; + tuple_delta_t copy; + copy.axis_tuples = tuple.axis_tuples; + copy.indices.push (true); + copy.deltas_x.push ((float) round ((double) tuple.deltas_x[inner] * scale)); + if (unlikely (copy.axis_tuples.in_error () || copy.indices.in_error () || + copy.deltas_x.in_error ())) return false; + private_row.tuple_vars.push (std::move (copy)); + } + if (unlikely (vars.length >= 0xFFFFu)) return false; + if (unlikely (private_row.tuple_vars.in_error ())) return false; + idx = vars.length << 16; + vars.push (std::move (private_row)); + var_data_num_rows.push (1); + if (unlikely (vars.in_error () || var_data_num_rows.in_error ())) return false; + if (default_value < -32768 || default_value > 32767) + { + // A neutral region can carry the bias when the int16 default cannot. + unsigned count = vars[idx >> 16].tuple_vars.length; + add_tuple (idx >> 16, hb_hashmap_t (), + 0, default_value, 1); + default_value = 0; + const auto &tuples = vars[idx >> 16].tuple_vars; + if (unlikely (tuples.in_error () || tuples.length != count + 1 || + tuples.tail ().indices.in_error () || + tuples.tail ().deltas_x.in_error ())) return false; + } + } + if (!condition_map.set (condition.first, hb_pair (idx, default_value))) + return false; + } + return !condition_map.in_error (); + } + /* keep below APIs public only for unit test: test-item-varstore */ bool create_from_item_varstore (const ItemVariationStore& varStore, const hb_map_t& axes_old_index_tag_map, diff --git a/src/hb-subset-plan-layout.cc b/src/hb-subset-plan-layout.cc index bd6022b75..2483e13a1 100644 --- a/src/hb-subset-plan-layout.cc +++ b/src/hb-subset-plan-layout.cc @@ -490,6 +490,8 @@ collect_layout_variation_indices (hb_subset_plan_t* plan) OT::hb_collect_variation_indices_context_t c (&varidx_set, &plan->_glyphset_gsub, &plan->gpos_lookups); + if (plan->normalized_coords && !plan->all_axes_pinned) + c.condition_values = &plan->layout_condition_values; gdef->collect_variation_indices (&c); if (hb_ot_layout_has_substitution (plan->source)) @@ -508,6 +510,7 @@ collect_layout_variation_indices (hb_subset_plan_t* plan) unsigned subtable_count = gdef->get_var_store ().get_sub_table_count (); generate_varstore_inner_maps (varidx_set, subtable_count, plan->gdef_varstore_inner_maps); + plan->check_success (!plan->layout_condition_values.in_error ()); gdef.destroy (); gsub.destroy (); diff --git a/src/hb-subset-plan-member-list.hh b/src/hb-subset-plan-member-list.hh index 5d1edd9c7..9276027b2 100644 --- a/src/hb-subset-plan-member-list.hh +++ b/src/hb-subset-plan-member-list.hh @@ -127,6 +127,11 @@ HB_SUBSET_PLAN_MEMBER (hb_map_t, colrv1_new_deltaset_idx_varidx_map) //Old layout item variation index -> (New varidx, delta) mapping HB_SUBSET_PLAN_MEMBER (mutable hb_hashmap_t E()>), layout_variation_idx_delta_map) +//Layout condition -> (source variation index, default value) +HB_SUBSET_PLAN_MEMBER (hb_hashmap_t E()>), layout_condition_values) +//Layout condition -> (private variation index, rescaled default value) +HB_SUBSET_PLAN_MEMBER (mutable hb_hashmap_t E()>), layout_condition_idx_value_map) + //gdef varstore retained varidx mapping HB_SUBSET_PLAN_MEMBER (hb_vector_t, gdef_varstore_inner_maps) diff --git a/test/api/fonts/feature-variation-precision-GPOS-legacy-large.ttf b/test/api/fonts/feature-variation-precision-GPOS-legacy-large.ttf new file mode 100644 index 0000000000000000000000000000000000000000..ed8fb2495db6c01aeecdb50c3ea3dba7583cb128 GIT binary patch literal 1368 zcmah|OKTHR6#nkaBz@S{2N9tZ97|eT5CdAIh|s1csf)%+lR_& z_bI(Sduu-PCiXE#{u}uZvzf)2(Z`pc1I{b*#raI^QhYN06;MU;tGTjQ!wO!L7yIe; zyI%dti>L2_kV}5DP}*MSmtaj3sbbz+i=OWLO!_C!l_CZ9uzEyQlzg;UZf;piq@dms z4V9`nPdNIEeyHqi)tI|Q{SESN#VhBx&i22gK0$uBR&6wQr@r$}dyM=lq*k7H57M7j zj$iu)+x|fbzU-K^_P!z`*b-R-eQdWq$+$Wj$|TZZP+HQzFWU3m7r?fb)I)^e9Egsj zI-*YzXcyk>(FkM< zI%g#dZlJ)M&s)m zCp1oKoD$4F$b1gqla z^(J!SQkjCak*`-UaF2jzS|T-vF>1olUZIzJ(+kN=?$I4-nOVz(t<8 literal 0 HcmV?d00001 diff --git a/test/api/fonts/feature-variation-precision-GPOS-legacy-third.ttf b/test/api/fonts/feature-variation-precision-GPOS-legacy-third.ttf new file mode 100644 index 0000000000000000000000000000000000000000..888e39908d3b1e9d56b358a68ffc82f28f7e2e77 GIT binary patch literal 1364 zcmah|O;1xn6g~6aYxxjRNp(R;e3F8Y7$HgwF($Ow4;LVYmIO=;yp+J=3>O`v=F>A_;p$J)tW~94(fcJJt#< zsP|OErE1O-#C-7&m%W`DYq#jXN$ggVQwW1y)1m}=C z);hBKEQOJAq>hbup*ofQJ4ouWIU>}udW3acc2UJPnsAY$Rlx>)B467sYN#VmkB>&c zEfE)(QDSZ#StOC6PGA`eSe5SozR{y+B6lBE7DkngG3DTb3SnG@F`>Fb@k?H*8Jg4j zhSmwKlUk=l^Bm-U4rNfERiD<=+@0Pj#18%1ifP91+HT*of~8u_m7#d5QSkNh08}D1 zpXF)lSIFCzc*bt!>lF;#r{INVq~9>c=o5c8M=#$@FQh6<4?6bDJsZEQ8KFn|kSybi zaK6<+VSWYRi^2#TW1Q9%NC0t*!Z*jiR#Ka+Vrme(FTld|!o{`Y`YHJZFX%@qXxAgP phl3Ysst)V*We>B9blT=jAE%gOu`}*24@`d{1UjBd9^46#nMkoAhB@A4C_W;I*W+1+k(zaZh`Ucoots$Hzyh zA1lYN|AK9QCxg!qOj+$&IEpPRYhjMNz+(QOu}L^M7ud4Hh*aYAkeS4IU|YP+yT)dGH#P!W(QeFn+ttmco2ypV z{H9;6xV3sd=Qn6A<_nu8ubxSyGx6;FGUni68&zzg2^Tq96|BK0^0n=vhC1@}_-F*& zB5{EkCFa(VK>}&&II@_>vULCVjUGM|x%;THFrsXXDhKCP2xBUYan%)yUGz%L(5%)s zw2o_?&^jra=OFj9FQ@cb^=UoH-RYg-@30u=fNtNjf~8u_m7#d5QSkNh08~6Vm*HvZ zSIFCzc*btz>lF;#r{INVq~9<`=@Wl9M=#$@FQh6<4?1?tJsZEQ8KFn|kSybiaK6<+ zVSWYRi^4D*W1Q3#NC0t*!Z*jiR#Ka+Vrme(FTld|!o{_t`YHJZFX%@qXxAgPhl3Ys lst)V*We>B9blT=jA19b&u`}*24@`d{1UjBd9^4dMz>)`3k5k`HfWGFJT>T$cz2V)+4|C z{MCz(KqyRpDwEsW;!V&qL@Jy1H^b+9Ka>8+b0bTEGpwFcCHCQLzPhVdNI|_P8p;(@ zzHsyx{ZQWDEirdZ{ax~2!Oy36FZR8rK1%+uRIF4Fr@!+}XPo>7q*k5}5AO}GpT6}A zj`M>Od^xabHE)p-9EogzK8{zPVqB9AWfJKmC?n}R5;Z-K1aS0H@^N?uh$Z>}^SI30 zwXHzYf6&qtxVY4y<%JQ+#O4A+?mw?Bx7%GL}e2mlsws4l)CBTY?!N<+3pK0}Wj zealE9h6HgG%UHmwl>hfcTbm-Y4=ark}{*EvA`JI zJboGAmSGsKCC)-0NYNhL_kzN1* literal 0 HcmV?d00001 diff --git a/test/api/fonts/feature-variation-precision-GPOS-lookup-third.ttf b/test/api/fonts/feature-variation-precision-GPOS-lookup-third.ttf new file mode 100644 index 0000000000000000000000000000000000000000..9a30241f2313a75f2f45a4e80a8ee11f2c6325ca GIT binary patch literal 1368 zcmah|J8Tm{5Pf@h&JQR20!0*wBXU9_AwUoz3n5|$+ewkgD0ZZzK*`B=>{I-c?I1f1 zDJc;JqNau#L`g+SMM0GSLKL*r=FP614`4C&&d$8~?9A>Q6o3)z!N%r7ES}g;+7|)) z3DLEM2gy|8{pTR{ed?bUQmgY*&u_f~oVU~q$<+0m(Qx!DpbFGCGbOKz4ZNfNje2D3 zkym^1`sGI;;8G9gi>)p0Br8Iu3OO$ux)9u_{FCc;fq*@sp3xMd9x9X?O>2!3)CaQh zVkP5=#(1%hm%L_`wOh0=Qg_QYI>Wxz1-7r#DXD z{RP|pK?GkOo3gsQU?f{IYhsM;w!_S;t05+tj+4^J@FCQVJOp4{Yw9TiaE_p!(uwSI zBzi`X=;`l59ai>lC#lEg8YP$Pqpag9cZWaG6YVy6RCA?kRP+p>AA>kW%l~KqTb(;m z7^Ac4z+(KEkqJ1s+>zykNvXscBr=Pcj%@KY9~znd1K94!igJC)YgKj{Zl+Ss`VGHQ zcB{2q#;;Ra$>n#7UM(F@rDLnh>sW$^7An|511>U@%E-c}=4;tS6*c5&@lo$!E7bFh zC^EK&G~!5+$FPcJtV{QQzv#(3k+%;i3zN#mlyY!I1u(7pFr)ed(Q96@5t!HfzUDE_ zNf=okY4}* literal 0 HcmV?d00001 diff --git a/test/api/fonts/feature-variation-precision-GPOS-lookup.ttf b/test/api/fonts/feature-variation-precision-GPOS-lookup.ttf new file mode 100644 index 0000000000000000000000000000000000000000..15b68faea8f01f48f4edd6480a64d907bcc4460d GIT binary patch literal 1368 zcmah|OK4L;6g~6aOMj;ILv>LKK1*6#5Ctt#L~K)&w2PEVlR~?Y=8^BC`H_z_-Pol| zaUrf<>soQ?%B3K#h?h7W=*^*fkV{ErQ$Go~4>Lk-~Qd%>7sOm-@Dqve1>L~(nj#NFR6WQlU z^b8}`)8BbERuk^bDXMgE&LW|7ZZY&YdWX z(b;rhF@DU*R5-ZOk>!L*sl*wiW)?FY+2U(HG&21Mu-%ar<$By}RhkVqT`6b$hF>YW z)mk>~*D0-K^Ub1HOGXpP$ok4A;_%Qy1x+;IB2B4`416MA%Py*@Axn#odPlcLoM%Ll zu{9(SMS?tnb*x}hy8rt{Pu_{VeMniDR5qrRgR3flY1M}r)gK67_lk|cqUQHCk7yp% zJSLp?An$WT7xY~PHJ|0_v@Y;>l8ojU@4mBwrP_>@rFg3$++*Y}R3sKp@;3Dp^0mdE zzT4Sa86&$SPDc0jB+^13rnrl4fNO~MAxLeOUNr0(e`A--qqImj!VQ_-bYyaYIXHFv zD!>WD1RNur*A+<=aht>$Gv!2juOLUjP6A literal 0 HcmV?d00001 diff --git a/test/api/fonts/feature-variation-precision-GSUB-legacy-large.ttf b/test/api/fonts/feature-variation-precision-GSUB-legacy-large.ttf new file mode 100644 index 0000000000000000000000000000000000000000..278419e15a3949b8e5c1837911d2141d70d9afc0 GIT binary patch literal 1372 zcmah|%TE(w5dVF<+X7nf5sV2TaV6!I7>$M~F(y##!vlz+B>|&>O)2e$zS1rPywIaZ z_34|?+A#l%0rcvBDFMUC;`$;5O0&9~b^72>qtd^7XSduE{k^q~P0tEqS*Y0fv! z0_H{9&;>`PNsTY8CkNn&D^rb7Y$=Fvw709nhJ^-O8`N@27XPq~}m?lz%oU;}^6ZuT~C(qRa1?G@?%qP*07E0c>u|x{$ z9noO1l68cmy}S>Wob4)eH~4;wyj^xmx$SekulXJ)zgMl)y}haLjA@RMUxn1l^W5}) zt(>^=8>ab#5`5Y9(`wx!Bbee@18q#ZIZ3}d8_LAfK~P%K+ZMGf+X9%zl6r&?tbNgu zREPH|0ySeu9;t6bwKF?hN%Apy`iaGRKl8Z2+u~37WV1;e(^%;o6*WWXLJyAf<$utP z^`IvT161}aFlayE(-c@ZAJ7tESTeDCD4D=`KpULqeV?X&H#P!Vk*?1=JC#k(&Q{86 zuIEF&9IIVjX(RhN<`8v&CC-{;B*wB8Y`$j{XDw(VB$JmPNQ1Rq!hTYU# z$Z1Pe3dTmRRz}|g0ym>IJ=tjkVT|~WXr<_-pGR_&NV+EtUteY<$D)QBuYtf4@rPXg`mIDP@eNQF;?-i^ZDIxQiN6!a z*SFl(i#M-60YQg2R<7-=b0=AGGF2(LYtakgJ<11Mw<}cGPen3Szw2$Lj8OleJs4-zRn&ZoRa9Y4{!ON#gyc*Y51k{@|JR6!9wLu3QI}XRVyM z`wO=HlNx+|V#@06q9fUoSrcPyryFBlT@7`T=}%HxGkmD(MII_(TTAL0f(RU`PL%qx z&ywhwK>9>~2kNl0aM_pTgbAr6FhtD^rhVDsYd$hE{Rgq(%ZhS4>+X1)9jE9u)~cPV z*KnGxQnA{mv`{K<*4$Phl`kY0=a-R%iye5_L26&1vk3Sn9e1QXZXS|>QC`8~~( znx`~R3uhnXeU9k7?p0Xx8J)zhagMm(*qHMdw}PZ|sseLW{YH>?4SRUyaPh z@n_enW!FFZrGK`ZYG%e{4e5-MO>WY!GqY@JklG(`85H982F@{CoDszzY_5he=-@mzjW$1ys(j9 literal 0 HcmV?d00001 diff --git a/test/api/fonts/feature-variation-precision-GSUB-legacy.ttf b/test/api/fonts/feature-variation-precision-GSUB-legacy.ttf new file mode 100644 index 0000000000000000000000000000000000000000..13f270679879f3d647f6b35b15cdf731badeaebb GIT binary patch literal 1368 zcmah|y-!n76#w1#UJGc!k5mUj;*%7F#Ar0cG{yvq{cr$lXh~o&@KQ?qLch`$0xmK- z8Yc%Q7Z+VzO#B0kqYmz%#yGe-*WbDK6{tcy?LGJW&euKn-1DFS3}F{GRx`;|8d>`y zU_YUDDf1wkyYcz$7veqQtxRrlHXF~p0-Pn{582%Hn~8Yh8=%U>tA(o9zzW_Iej4KCMR0tC)j7ilON?h|Q?a-{|cQsFH zp3*!moPCh@Ii&NtR}sypcsi{!{PmL29O2z}RoPU;EdON%f4 zHj2#}h8~eP72TJUdA1P7xQ>_pD`tsuNnMs+blx@o#x9wow3wU7K7<(f)yQlde|E($ zdBNE)g0tmRGczV@SZ9=Ma+6-2nPpRh)PA4KpfJBTaCR{Y#|Y>2eZ@}PA#u9-*GxJg eapnY(BR%*mV=UdBhzyzjO2kY2$z72F&Ygq#1Ns_77isCS`siC*p$+4*nXs42za4K zkH(W{FP^-3G4U_pWc1)&)EEz5J$S0Wd9Qp_ZJhSaoB6$&dGlswp#b!u4jb!p@kG*I ztX~G~Cqy62-Cs=K{P6lC^{>=-=F-cv@22L50Ouj~gT?fXTd~R57eE!LuV;&11#5Uq zUF>Hzcf9KJS1;ZJktp@ae6Y94on+0BsY1@%h+gXXMEM8T?E(RNSUuyB*hdS+aMxO) z1a&|*7?iV~X!Mu!!J@ZYVeS^s=c&6TubA5%>V3oWIQ7FyxfUKyf8(9@81;3?Te)8T z3bA%>>L+abI}v=|H)$R1f{|>AtcgCh+n8iroeeRGbefb#dXJ$a&tm|#wW6LP0_Oy3 zE44(QCebp6WLtX|>NvB18%aJkS3kK#?`Iy@xI6rbo@_M8W11_SqoQR5o#@6{p8Sux zu-UAM!T^oU3oQB%7@2^BD@|E$7?DhzZXy#HZ^{y($*oj#S-(bUDVN_4ylN(q&cv4&R*`~-J(RJH5H7NmO4xu;&DXMv3aZHQ#7C`( zEm6mdC(p^Lg!J(^GOcAn1g*GdLC#Vs92s&Cb`tCGHoeukyE0~JrEGOVVa zLUvnTrC@F4swMP2CUG*3x+gPjp#!5P5WN(m^m9pWa+9t}-PlWyWI41DPkD{(eTd>N z<)Gc&fuHx<-fgDG#O~1XB&NKl6_cqJRLJb6e#R2am^03A5S(WW!!g1ISo=~R-Q5O> i6VJb9`fWO@iF}@~wRClQWYF}NBA)s-1sS|QF!dWfHj-Wd literal 0 HcmV?d00001 diff --git a/test/api/fonts/feature-variation-precision-GSUB-lookup-third.ttf b/test/api/fonts/feature-variation-precision-GSUB-lookup-third.ttf new file mode 100644 index 0000000000000000000000000000000000000000..acb902f1b3fe176deaf066650fee0f016ece5c0d GIT binary patch literal 1368 zcmah|OHWf#5dO}+w>%UOO?5#?xRQd97+)cV7?l>=!UDw5lEA{yo3^w!+&>@%Q>)HB(VSH(KsQU5|c zy0PumUcP?y9tgSArwhUE26vJbB~!(`my2BNJD~iX>voZVJ*r;N6rmm|mKr;joCLK` zHXKy4o@k60`*6wIsj_y9_Ic`V*(>FDM*82<9;bd-t<)QbGhcb8JwZJKxhvO?U**B| zb9aBjw!aaCZ@_AVI7mdu(MW4q01=GD~@lT0T`X{7%MYDXRcu&q_~93eQzP)F%h z_8AgAV@P)NccG3d`?r(SV{?VcC3~24T;=ZYCwj8kB#&vXbd8FhA#|e`XKDE#^PpIK4!sFxiqVzUE^i)4vCsEm={nFL=9^t%jSelyiQ= zuawycPMtv3mTzW%^zqU z*F2$lQaJk{?{iESbg%j}pW^AX-az!&uBE6(46fz&J1bbK$yiyy8MfgLR6MzmW+(Lo z@}ew+DP83Rv9oQn3#$vj)=!nlr?{wrn)b4gv6UUc3w{>Cnu!?c*2$UcAw?$a&k zbavnuypCs^$uYURbY96R_c@KpL<=fpcGElK30BPc=JyBAGDhJT;k>@T#87XNIPLsv dCY_O7?ehldW9jbn$&l%<#CT{o8M;3(^&92qkzW7+ literal 0 HcmV?d00001 diff --git a/test/api/fonts/feature-variation-precision-GSUB-lookup.ttf b/test/api/fonts/feature-variation-precision-GSUB-lookup.ttf new file mode 100644 index 0000000000000000000000000000000000000000..36d41752875f790ac7e452e73d9b23688831dd94 GIT binary patch literal 1368 zcmah|OHWf#5dO}+w>%UOO?5#?xRQd97>$OQ#;8zi3kwiKO9Bf6H>I>U+&&&G|3zksDK+=Ck9!mWwB`pr2lP_c2^GiTPOUf=29!OPae*X0M07)!==>iyRm5OE1>e!H!=mUjCFjV{*C&~ z){a+sbMW>f5OS$UbHUygcak+jrt(>DGjg@>i1JUadwBx(sCrFPgnA@jsO?&E64W8t za8Sy4qA_0V!v$}*%-Sv5=c&6zuaMmx>3>gqoceLORIMFPf9IL@1oaKbUAYc^7YElb zJ@^IN{y_v^UYN34yI>?+GHYUt?KYy!tE(XNF#w1c^oTP#G2gx{EN2tMBYB4EQ~1|Sf(n`4^v-yK6?4A%{eiQLQ8-4ptnV)|)EgvDJO7$VXCzna Yyg~X{x;uR`Wcn*H9@