diff --git a/src/hb-ot-post-table.hh b/src/hb-ot-post-table.hh index f9cfd7f16..80d02ffba 100644 --- a/src/hb-ot-post-table.hh +++ b/src/hb-ot-post-table.hh @@ -102,6 +102,14 @@ struct post if (!serialize (c->serializer, glyph_names)) return_trace (false); + if (c->plan->user_axes_location->has (HB_TAG ('s','l','n','t')) && + !c->plan->pinned_at_default) + { + float italic_angle = c->plan->user_axes_location->get (HB_TAG ('s','l','n','t')); + italic_angle = hb_max (-90.f, hb_min (italic_angle, 90.f)); + post_prime->italicAngle.set_float (italic_angle); + } + if (glyph_names && version.major == 2) return_trace (v2X.subset (c)); diff --git a/test/subset/data/expected/instantiate_glyf/Roboto-Variable.ABC.default.retain-all-codepoint.wght=200,wdth=90.ttf b/test/subset/data/expected/instantiate_glyf/Roboto-Variable.ABC.default.retain-all-codepoint.wght=200,wdth=90.ttf new file mode 100644 index 000000000..65fbb613a Binary files /dev/null and b/test/subset/data/expected/instantiate_glyf/Roboto-Variable.ABC.default.retain-all-codepoint.wght=200,wdth=90.ttf differ diff --git a/test/subset/data/expected/instantiate_glyf/Roboto-Variable.ABC.default.retain-all-codepoint.wght=650,wdth=85.ttf b/test/subset/data/expected/instantiate_glyf/Roboto-Variable.ABC.default.retain-all-codepoint.wght=650,wdth=85.ttf new file mode 100644 index 000000000..ad3031ba6 Binary files /dev/null and b/test/subset/data/expected/instantiate_glyf/Roboto-Variable.ABC.default.retain-all-codepoint.wght=650,wdth=85.ttf differ diff --git a/test/subset/data/expected/instantiate_glyf/Roboto-Variable.composite.default.retain-all-codepoint.wght=200,wdth=90.ttf b/test/subset/data/expected/instantiate_glyf/Roboto-Variable.composite.default.retain-all-codepoint.wght=200,wdth=90.ttf new file mode 100644 index 000000000..69682fed8 Binary files /dev/null and b/test/subset/data/expected/instantiate_glyf/Roboto-Variable.composite.default.retain-all-codepoint.wght=200,wdth=90.ttf differ diff --git a/test/subset/data/expected/instantiate_glyf/Roboto-Variable.composite.default.retain-all-codepoint.wght=650,wdth=85.ttf b/test/subset/data/expected/instantiate_glyf/Roboto-Variable.composite.default.retain-all-codepoint.wght=650,wdth=85.ttf new file mode 100644 index 000000000..ba3ddca6e Binary files /dev/null and b/test/subset/data/expected/instantiate_glyf/Roboto-Variable.composite.default.retain-all-codepoint.wght=650,wdth=85.ttf differ diff --git a/test/subset/data/fonts/Roboto-Variable.composite.ttf b/test/subset/data/fonts/Roboto-Variable.composite.ttf new file mode 100644 index 000000000..d0e12c0cc Binary files /dev/null and b/test/subset/data/fonts/Roboto-Variable.composite.ttf differ diff --git a/test/subset/data/tests/instantiate_glyf.tests b/test/subset/data/tests/instantiate_glyf.tests new file mode 100644 index 000000000..e297667ad --- /dev/null +++ b/test/subset/data/tests/instantiate_glyf.tests @@ -0,0 +1,13 @@ +FONTS: +Roboto-Variable.ABC.ttf +Roboto-Variable.composite.ttf + +PROFILES: +default.txt + +SUBSETS: +* + +INSTANCES: +wght=650,wdth=85 +wght=200,wdth=90 diff --git a/test/subset/meson.build b/test/subset/meson.build index a6c117664..22b69ca6d 100644 --- a/test/subset/meson.build +++ b/test/subset/meson.build @@ -50,6 +50,9 @@ tests = [ 'glyph_names', 'post', '32bit_var_store', +# instacing tests, enable when --instance is not experimental +# 'pin_all_at_default', +# 'instantiate_glyf', ] repack_tests = [