diff --git a/src/hb-cairo-utils.cc b/src/hb-cairo-utils.cc index dd27ed908..1eeee7a40 100644 --- a/src/hb-cairo-utils.cc +++ b/src/hb-cairo-utils.cc @@ -288,9 +288,7 @@ _hb_cairo_get_color_stops (hb_cairo_context_t *c, if ((*stops)[i].is_foreground) { double r, g, b, a; - cairo_pattern_t *foreground; - - foreground = cairo_user_scaled_font_get_foreground_source (c->scaled_font); + cairo_pattern_t *foreground = cairo_user_scaled_font_get_foreground_source (c->scaled_font); if (cairo_pattern_get_rgba (foreground, &r, &g, &b, &a) == CAIRO_STATUS_SUCCESS) (*stops)[i].color = HB_COLOR (round (b * 255.), round (g * 255.), round (r * 255.), round (a * hb_color_get_alpha ((*stops)[i].color))); diff --git a/src/hb-cairo.cc b/src/hb-cairo.cc index 9d777017d..0033ea5be 100644 --- a/src/hb-cairo.cc +++ b/src/hb-cairo.cc @@ -253,10 +253,8 @@ hb_cairo_paint_color (hb_paint_funcs_t *pfuncs HB_UNUSED, if (use_foreground) { - cairo_pattern_t *foreground; double r, g, b, a; - - foreground = cairo_user_scaled_font_get_foreground_source (c->scaled_font); + cairo_pattern_t *foreground = cairo_user_scaled_font_get_foreground_source (c->scaled_font); if (cairo_pattern_get_rgba (foreground, &r, &g, &b, &a) == CAIRO_STATUS_SUCCESS) cairo_set_source_rgba (cr, r, g, b, a * hb_color_get_alpha (color) / 255.); else