cairo-chart: Use "Sans" instead of "sans serif" as font.
authorBen Pfaff <blp@cs.stanford.edu>
Fri, 5 Jun 2015 03:09:24 +0000 (20:09 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Fri, 5 Jun 2015 03:09:24 +0000 (20:09 -0700)
This fixes a bug on Windows, where Pango doesn't have a font
named "sans serif" but does have one named "Sans".

Reported and tested by Harry Thijssen.

src/output/cairo-chart.c

index 2cf3c2d6b8bf886da5c770329746adb9d587560e..fbb1d77c1de75abb23f46a86e66b51a2c4a2c6d9 100644 (file)
@@ -179,7 +179,7 @@ xrchart_label_rotate (cairo_t *cr, int horz_justify, int vert_justify,
   PangoLayout *layout;
   double x, y;
 
-  desc = pango_font_description_from_string ("sans serif");
+  desc = pango_font_description_from_string ("Sans");
   if (desc == NULL)
     {
       cairo_new_path (cr);
@@ -580,7 +580,7 @@ xrchart_text_extents (cairo_t *cr, const struct xrchart_geometry *geom,
   int width_pango;
   int height_pango;
 
-  desc = pango_font_description_from_string ("sans serif");
+  desc = pango_font_description_from_string ("Sans");
   if (desc == NULL)
       return;
   pango_font_description_set_absolute_size (desc, geom->font_size * PANGO_SCALE);