diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 619e7c4b8..52b7dc254 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -2272,7 +2272,11 @@ struct VarRegionAxis { float evaluate (int coord) const { - int start = startCoord.to_int (), peak = peakCoord.to_int (), end = endCoord.to_int (); + int peak = peakCoord.to_int (); + if (peak == 0 || coord == peak) + return 1.f; + + int start = startCoord.to_int (), end = endCoord.to_int (); /* TODO Move these to sanitize(). */ if (unlikely (start > peak || peak > end)) @@ -2280,9 +2284,6 @@ struct VarRegionAxis if (unlikely (start < 0 && end > 0 && peak != 0)) return 1.f; - if (peak == 0 || coord == peak) - return 1.f; - if (coord <= start || end <= coord) return 0.f;