summaryrefslogtreecommitdiff
path: root/src/cairo-user-font.c
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2021-08-14 18:14:44 +0930
committerAdrian Johnson <ajohnson@redneon.com>2021-08-14 18:26:09 +0930
commit8c3c41ca737e35740cd2fd7ddf09533f0453dc91 (patch)
tree6563452f6f8420e0c15d7b7f31a05a6535e9d389 /src/cairo-user-font.c
parent48d606114905dba86d165fd6824f3f0ff73e5120 (diff)
downloadcairo-8c3c41ca737e35740cd2fd7ddf09533f0453dc91.tar.gz
Add cairo_user_font_face_get_render_color_glyph_func
Diffstat (limited to 'src/cairo-user-font.c')
-rw-r--r--src/cairo-user-font.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/cairo-user-font.c b/src/cairo-user-font.c
index 9b8872db5..089b64ad2 100644
--- a/src/cairo-user-font.c
+++ b/src/cairo-user-font.c
@@ -871,6 +871,34 @@ cairo_user_font_face_get_init_func (cairo_font_face_t *font_face)
}
/**
+ * cairo_user_font_face_get_render_color_glyph_func:
+ * @font_face: A user font face
+ *
+ * Gets the color glyph rendering function of a user-font.
+ *
+ * Return value: The render_glyph callback of @font_face
+ * or %NULL if none set or an error has occurred.
+ *
+ * Since: 1.18
+ **/
+cairo_user_scaled_font_render_glyph_func_t
+cairo_user_font_face_get_render_color_glyph_func (cairo_font_face_t *font_face)
+{
+ cairo_user_font_face_t *user_font_face;
+
+ if (font_face->status)
+ return NULL;
+
+ if (! _cairo_font_face_is_user (font_face)) {
+ if (_cairo_font_face_set_error (font_face, CAIRO_STATUS_FONT_TYPE_MISMATCH))
+ return NULL;
+ }
+
+ user_font_face = (cairo_user_font_face_t *) font_face;
+ return user_font_face->scaled_font_methods.render_color_glyph;
+}
+
+/**
* cairo_user_font_face_get_render_glyph_func:
* @font_face: A user font face
*