summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/harfbuzz-ng/src/hb-subset-instancer-solver.cc
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2023-11-15 14:58:42 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-11-17 05:15:29 +0000
commite2cbce919ccefcae2b18f90257d67bc6e24c3c94 (patch)
tree3b54ea5c50ce29b90dd8a966ed2dfda7a83bbc9a /src/3rdparty/harfbuzz-ng/src/hb-subset-instancer-solver.cc
parent49bd0a8190eac08d630e37f636eb2da1f8d49a4d (diff)
Upgrade to Harfbuzz 8.3.0v6.6.16.6.1
Fixes: QTBUG-119150 Change-Id: I80f21f6f27cce14a1e91e822c3681ec491491ff1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 98ca28f7a65b2d4e0a90e2d74448ad6992260a1c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 67637f2c4056bccf71a880253eaaaa5f09494cf9)
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-subset-instancer-solver.cc')
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-subset-instancer-solver.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-subset-instancer-solver.cc b/src/3rdparty/harfbuzz-ng/src/hb-subset-instancer-solver.cc
index 4cb3f8a485..4876bc4379 100644
--- a/src/3rdparty/harfbuzz-ng/src/hb-subset-instancer-solver.cc
+++ b/src/3rdparty/harfbuzz-ng/src/hb-subset-instancer-solver.cc
@@ -168,12 +168,14 @@ _solve (Triple tent, Triple axisLimit, bool negative = false)
* |
* crossing
*/
- if (gain > outGain)
+ if (gain >= outGain)
{
+ // Note that this is the branch taken if both gain and outGain are 0.
+
// Crossing point on the axis.
float crossing = peak + (1 - gain) * (upper - peak);
- Triple loc{axisDef, peak, crossing};
+ Triple loc{hb_max (lower, axisDef), peak, crossing};
float scalar = 1.f;
// The part before the crossing point.
@@ -253,7 +255,7 @@ _solve (Triple tent, Triple axisLimit, bool negative = false)
* axisDef axisMax
*/
float newUpper = peak + (1 - gain) * (upper - peak);
- assert (axisMax <= newUpper); // Because outGain >= gain
+ assert (axisMax <= newUpper); // Because outGain > gain
if (newUpper <= axisDef + (axisMax - axisDef) * 2)
{
upper = newUpper;