diff --git a/src/hb-raster-paint.cc b/src/hb-raster-paint.cc index 6ad0036ed..20643fcac 100644 --- a/src/hb-raster-paint.cc +++ b/src/hb-raster-paint.cc @@ -1177,6 +1177,24 @@ hb_raster_paint_set_extents (hb_raster_paint_t *paint, paint->fixed_extents.stride = paint->fixed_extents.width * 4; } +/** + * hb_raster_paint_set_foreground: + * @paint: a paint context + * @foreground: the foreground color + * + * Sets the foreground color used when paint callbacks request it + * (e.g. `is_foreground` in color stops or solid fills). + * + * XSince: REPLACEME + **/ +void +hb_raster_paint_set_foreground (hb_raster_paint_t *paint, + hb_color_t foreground) +{ + if (unlikely (!paint)) return; + paint->foreground = foreground; +} + /** * hb_raster_paint_get_funcs: * diff --git a/src/hb-raster.h b/src/hb-raster.h index 3687c0435..4220caa1d 100644 --- a/src/hb-raster.h +++ b/src/hb-raster.h @@ -222,6 +222,10 @@ HB_EXTERN void hb_raster_paint_set_extents (hb_raster_paint_t *paint, const hb_raster_extents_t *extents); +HB_EXTERN void +hb_raster_paint_set_foreground (hb_raster_paint_t *paint, + hb_color_t foreground); + HB_EXTERN hb_paint_funcs_t * hb_raster_paint_get_funcs (void);