diff --git a/src/hb-subset-instancer-solver.cc b/src/hb-subset-instancer-solver.cc index 4876bc437..70783c0a0 100644 --- a/src/hb-subset-instancer-solver.cc +++ b/src/hb-subset-instancer-solver.cc @@ -256,7 +256,10 @@ _solve (Triple tent, Triple axisLimit, bool negative = false) */ float newUpper = peak + (1 - gain) * (upper - peak); assert (axisMax <= newUpper); // Because outGain > gain - if (newUpper <= axisDef + (axisMax - axisDef) * 2) + /* Disabled because ots doesn't like us: + * https://github.com/fonttools/fonttools/issues/3350 */ + + if (false && (newUpper <= axisDef + (axisMax - axisDef) * 2)) { upper = newUpper; if (!negative && axisDef + (axisMax - axisDef) * MAX_F2DOT14 < upper) diff --git a/src/test-subset-instancer-solver.cc b/src/test-subset-instancer-solver.cc index 0a0aea8c2..a88aa3bda 100644 --- a/src/test-subset-instancer-solver.cc +++ b/src/test-subset-instancer-solver.cc @@ -95,9 +95,11 @@ main (int argc, char **argv) Triple tent (0.f, 0.2f, 1.f); Triple axis_range (-1.f, 0.f, 0.8f); result_t out = rebase_tent (tent, axis_range, default_axis_distances); - assert (out.length == 1); + assert (out.length == 2); assert (out[0].first == 1.f); - assert (out[0].second == Triple (0.f, 0.25f, 1.25f)); + assert (out[0].second == Triple (0.f, 0.25f, 1.f)); + assert (approx (out[1].first, 0.25f)); + assert (out[1].second == Triple (0.25f, 1.f, 1.f)); } /* Case 3 boundary */ @@ -105,9 +107,11 @@ main (int argc, char **argv) Triple tent (0.f, 0.4f, 1.f); Triple axis_range (-1.f, 0.f, 0.5f); result_t out = rebase_tent (tent, axis_range, default_axis_distances); - assert (out.length == 1); + assert (out.length == 2); assert (out[0].first == 1.f); - assert (out[0].second == Triple (0.f, 0.8f, 32767/(float) (1 << 14))); + assert (out[0].second == Triple (0.f, 0.8f, 1.f)); + assert (out[1].first == 2.5f/3); + assert (out[1].second == Triple (0.8f, 1.f, 1.f)); } /* Case 4 */ @@ -353,9 +357,11 @@ main (int argc, char **argv) Triple tent (0.f, 0.2f, 1.f); Triple axis_range (0.f, 0.f, 0.5f); result_t out = rebase_tent (tent, axis_range, default_axis_distances); - assert (out.length == 1); + assert (out.length == 2); assert (out[0].first == 1.f); - assert (out[0].second == Triple (0.f, 0.4f, 32767/(float) (1 << 14))); + assert (out[0].second == Triple (0.f, 0.4f, 1.f)); + assert (out[1].first == 0.625f); + assert (out[1].second == Triple (0.4f, 1.f, 1.f)); } diff --git a/test/subset/data/expected/mvar_partial_instance/NotoSans-VF.abc.default.retain-all-codepoint.wght=500-800.ttf b/test/subset/data/expected/mvar_partial_instance/NotoSans-VF.abc.default.retain-all-codepoint.wght=500-800.ttf index d267f59b7..c65f12476 100644 Binary files a/test/subset/data/expected/mvar_partial_instance/NotoSans-VF.abc.default.retain-all-codepoint.wght=500-800.ttf and b/test/subset/data/expected/mvar_partial_instance/NotoSans-VF.abc.default.retain-all-codepoint.wght=500-800.ttf differ