summaryrefslogtreecommitdiff
path: root/test/font-face-get-type.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2007-02-27 20:09:22 -0500
committerBehdad Esfahbod <behdad@behdad.org>2007-02-27 20:09:46 -0500
commited75e24898a5ccd7836596122b9a801294122874 (patch)
treed58b320cec987c75a39189b312dacf99003eb870 /test/font-face-get-type.c
parentd64b194a45d90b24d1cc01de0fa2cb4edc3a240b (diff)
Implement cairo_get_scaled_font()
Diffstat (limited to 'test/font-face-get-type.c')
-rw-r--r--test/font-face-get-type.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/font-face-get-type.c b/test/font-face-get-type.c
index 86f57695f..57cc859fb 100644
--- a/test/font-face-get-type.c
+++ b/test/font-face-get-type.c
@@ -31,6 +31,7 @@ main (void)
cairo_surface_t *surface;
cairo_t *cr;
cairo_font_face_t *font_face;
+ cairo_scaled_font_t *scaled_font;
cairo_test_init ("font-face-get-type");
@@ -43,16 +44,25 @@ main (void)
CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL);
- font_face = cairo_get_font_face (cr);
-
cairo_test_log ("Testing return value of cairo_font_face_get_type\n");
+ font_face = cairo_get_font_face (cr);
+
if (cairo_font_face_get_type (font_face) != CAIRO_FONT_TYPE_TOY) {
cairo_test_log ("Unexpected value %d from cairo_font_face_get_type (expected %d)\n",
cairo_font_face_get_type (font_face), CAIRO_FONT_TYPE_TOY);
return CAIRO_TEST_FAILURE;
}
+ cairo_test_log ("Testing return value of cairo_get_scaled_font\n");
+
+ scaled_font = cairo_get_scaled_font (cr);
+
+ if (cairo_scaled_font_get_font_face (scaled_font) != font_face) {
+ cairo_test_log ("Font face returned from the scaled font is different from that returned by the context\n");
+ return CAIRO_TEST_FAILURE;
+ }
+
cairo_destroy (cr);
cairo_surface_destroy (surface);