X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Foutput%2Fcairo.c;h=cd8f0b0e999decb2ae1434463885c045ae827600;hb=refs%2Fbuilds%2F20130102032118%2Fpspp;hp=da5740464e58c2c5a056d4be36c4c4d815375910;hpb=f481fd69631024bcdc7dc2369bbc1592d7a43ac7;p=pspp diff --git a/src/output/cairo.c b/src/output/cairo.c index da5740464e..cd8f0b0e99 100644 --- a/src/output/cairo.c +++ b/src/output/cairo.c @@ -322,7 +322,7 @@ xr_set_cairo (struct xr_driver *xr, cairo_t *cairo) cairo_set_line_width (xr->cairo, xr_to_pt (xr->line_width)); map = pango_cairo_font_map_get_default (); - context = pango_cairo_font_map_create_context (PANGO_CAIRO_FONT_MAP (map)); + context = pango_font_map_create_context (map); if (xr_is_72dpi (cairo)) { /* Pango seems to always scale fonts according to the DPI specified @@ -386,14 +386,12 @@ xr_create (const char *file_name, enum settings_output_devices device_type, struct string_map *o, enum xr_output_type file_type) { enum { MIN_WIDTH = 3, MIN_LENGTH = 3 }; - struct output_driver *d; struct xr_driver *xr; cairo_surface_t *surface; cairo_status_t status; double width_pt, length_pt; xr = xr_allocate (file_name, device_type, o); - d = &xr->driver; width_pt = (xr->width + xr->left_margin + xr->right_margin) / 1000.0; length_pt = (xr->length + xr->top_margin + xr->bottom_margin) / 1000.0; @@ -924,9 +922,12 @@ xr_draw_title (struct xr_driver *xr, const char *title, xr_draw_cell (xr, &cell, bb, bb); } -struct output_driver_factory pdf_driver_factory = { "pdf", xr_pdf_create }; -struct output_driver_factory ps_driver_factory = { "ps", xr_ps_create }; -struct output_driver_factory svg_driver_factory = { "svg", xr_svg_create }; +struct output_driver_factory pdf_driver_factory = + { "pdf", "pspp.pdf", xr_pdf_create }; +struct output_driver_factory ps_driver_factory = + { "ps", "pspp.ps", xr_ps_create }; +struct output_driver_factory svg_driver_factory = + { "svg", "pspp.svg", xr_svg_create }; static const struct output_driver_class cairo_driver_class = {