From ea316b56a0ef1e84c29cd31b45b083bbe0120f83 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 25 Jan 2023 15:31:29 -0700 Subject: [PATCH] [cairo] Flip offsets when reversing Fixes many of the var_colrv1 first row tests. https://roettsch.es/var_colrv1.html --- src/hb-cairo-utils.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hb-cairo-utils.cc b/src/hb-cairo-utils.cc index 5e5dadbd4..3466cba79 100644 --- a/src/hb-cairo-utils.cc +++ b/src/hb-cairo-utils.cc @@ -598,6 +598,8 @@ _hb_cairo_add_sweep_gradient_patches (hb_color_stop_t *stops, for (unsigned i = 0; i < n_stops - 1 - i; i++) hb_swap (stops[i], stops[n_stops - 1 - i]); + for (unsigned i = 0; i < n_stops; i++) + stops[i].offset = 1 - stops[i].offset; } if (n_stops > PREALLOCATED_COLOR_STOPS)