lib/igt_fb: setup font in igt_get_cairo_ctx

We always want the same boring one, so extract it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter
2014-03-26 16:36:46 +01:00
parent ae461e67e8
commit 7568edf4b1
4 changed files with 3 additions and 7 deletions
+3
View File
@@ -382,7 +382,10 @@ cairo_t *igt_get_cairo_ctx(int fd, struct igt_fb *fb)
surface = get_cairo_surface(fd, fb);
cr = cairo_create(surface);
cairo_surface_destroy(surface);
igt_assert(cairo_status(cr) == CAIRO_STATUS_SUCCESS);
cairo_select_font_face(cr, "Helvetica", CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL);
igt_assert(cairo_status(cr) == CAIRO_STATUS_SUCCESS);
return cr;