diff --git a/src/hb-cairo.cc b/src/hb-cairo.cc index c8e15a047..7b4d529b3 100644 --- a/src/hb-cairo.cc +++ b/src/hb-cairo.cc @@ -413,7 +413,7 @@ hb_cairo_init_scaled_font (cairo_scaled_font_t *scaled_font, { void *user_data = cairo_font_face_get_user_data (font_face, &hb_cairo_font_init_user_data_user_data_key); - init_func (font, scaled_font, user_data); + font = init_func (font, scaled_font, user_data); } hb_font_make_immutable (font); diff --git a/src/hb-cairo.h b/src/hb-cairo.h index 76469e941..cb7e53e5a 100644 --- a/src/hb-cairo.h +++ b/src/hb-cairo.h @@ -55,11 +55,13 @@ hb_cairo_font_face_get_face (cairo_font_face_t *font_face); * face created using hb_cairo_font_face_create_for_face() * creates an #hb_font_t for a #cairo_scaled_font_t. * + * Return value: the #hb_font_t value to use; in most cases same as @font + * * Since: REPLACEME */ -typedef void (*hb_cairo_font_init_func_t) (hb_font_t *font, - cairo_scaled_font_t *scaled_font, - void *user_data); +typedef hb_font_t * (*hb_cairo_font_init_func_t) (hb_font_t *font, + cairo_scaled_font_t *scaled_font, + void *user_data); HB_EXTERN void hb_cairo_font_face_set_font_init_func (cairo_font_face_t *font_face,