diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2006-08-31 14:21:51 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2006-08-31 14:22:10 -0400 |
commit | 7ad6e941017e070bf7d93afba4de5c49cd1ff533 (patch) | |
tree | 2750d4d3728e34ab8d70e8acbb32512a3a233e88 /test/bitmap-font.c | |
parent | 7f6e901a236ed267d396310fc56fa6bde697bfa2 (diff) |
[test] Use FcFreeTypeQuery
Diffstat (limited to 'test/bitmap-font.c')
-rw-r--r-- | test/bitmap-font.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/bitmap-font.c b/test/bitmap-font.c index ef9bbb6be..7e3c79e7d 100644 --- a/test/bitmap-font.c +++ b/test/bitmap-font.c @@ -31,6 +31,7 @@ #include <cairo-ft.h> #include <fontconfig/fontconfig.h> +#include <fontconfig/fcfreetype.h> #define FONT "6x13.pcf" #define TEXT_SIZE 13 @@ -52,6 +53,7 @@ draw (cairo_t *cr, int width, int height) cairo_status_t status; const char *srcdir = getenv ("srcdir"); char *filename; + int *face_count; struct stat stat_buf; if (! srcdir) @@ -64,15 +66,13 @@ draw (cairo_t *cr, int width, int height) return CAIRO_TEST_FAILURE; } - pattern = FcPatternCreate (); + pattern = FcFreeTypeQuery (filename, 0, NULL, &face_count); + free (filename); if (! pattern) { - cairo_test_log ("FcPatternCreate failed.\n"); + cairo_test_log ("FcFreeTypeQuery failed.\n"); return CAIRO_TEST_FAILURE; } - FcPatternAddString (pattern, FC_FILE, (unsigned char *) filename); - free (filename); - FcPatternAddInteger (pattern, FC_INDEX, 0); font_face = cairo_ft_font_face_create_for_pattern (pattern); status = cairo_font_face_status (font_face); |