summaryrefslogtreecommitdiff
path: root/test/user-font.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2008-08-07 15:44:11 -0400
committerBehdad Esfahbod <behdad@behdad.org>2008-08-08 03:01:15 -0400
commitb01ad0835d25fbee91d037e4484ba652075ffb39 (patch)
treea2ce730322ef064328bccc3fb16140ddef505c3c /test/user-font.c
parentd6ae23478ae6bde0714a50b2ed77e788f17cc03d (diff)
downloadcairo-b01ad0835d25fbee91d037e4484ba652075ffb39.tar.gz
[user-font] Add a cairo_t argument to cairo_user_scaled_font_init_func_t
The init func does not actually need to draw anything, but having a cairo_t similar to that passed to render_glyph is handy for computing font extents. This is because cairo makes doing some things really hard (if not impossible) without a cairo_t. The user-font-proxy test case is a great example of how the added cairo_t makes life much easier.
Diffstat (limited to 'test/user-font.c')
-rw-r--r--test/user-font.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/user-font.c b/test/user-font.c
index c414719df..406bd3aee 100644
--- a/test/user-font.c
+++ b/test/user-font.c
@@ -74,6 +74,7 @@ static cairo_user_data_key_t test_font_face_glyphs_key;
static cairo_status_t
test_scaled_font_init (cairo_scaled_font_t *scaled_font,
+ cairo_t *cr,
cairo_font_extents_t *metrics)
{
metrics->ascent = .75;