The first patch didn't show anything interesting. So here is the second. To be applied to HEAD. As before please do a print, and show me the stdout.
J' -- PGP Public key ID: 1024D/2DE827B3 fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3 See http://keys.gnupg.net or any PGP keyserver for public key.
diff --git a/src/output/cairo.c b/src/output/cairo.c
index cd8f0b0..39561bc 100644
--- a/src/output/cairo.c
+++ b/src/output/cairo.c
@@ -223,6 +223,11 @@ parse_font (struct output_driver *d, struct string_map *options,
/* Parse KEY as a font description. */
string = parse_string (opt (d, options, key, default_value));
desc = pango_font_description_from_string (string);
+
+ if (string_map_find (options, "printing"))
+ printf ("%s:%d Font: %s %p\n", __FILE__, __LINE__,
+ string, desc);
+
if (desc == NULL)
{
error (0, 0, _("`%s': bad font specification"), string);
@@ -237,8 +242,22 @@ parse_font (struct output_driver *d, struct string_map *options,
/* If the font description didn't include an explicit font size, then set it
to DEFAULT_POINTS. */
if (!(pango_font_description_get_set_fields (desc) & PANGO_FONT_MASK_SIZE))
- pango_font_description_set_size (desc,
- default_points / 1000.0 * PANGO_SCALE);
+ {
+ if (string_map_find (options, "printing"))
+ printf ("%s:%d Setting default size %g\n", __FILE__, __LINE__,
+ default_points / 1000.0 * PANGO_SCALE);
+
+ pango_font_description_set_size (desc,
+ default_points / 1000.0 * PANGO_SCALE);
+ }
+
+
+ if (string_map_find (options, "printing"))
+ {
+ printf ("%s:%d Size is %d; absolute %d\n", __FILE__, __LINE__,
+ pango_font_description_get_size (desc),
+ pango_font_description_get_size_is_absolute (desc));
+ }
return desc;
}
@@ -268,6 +287,16 @@ apply_options (struct xr_driver *xr, struct string_map *o)
xr->fonts[XR_FONT_EMPHASIS].desc = parse_font (d, o, "emph-font",
"serif italic", font_points);
+ if (string_map_find (o, "printing"))
+ {
+ printf ("%s:%d Fixed \"%s\"\n", __FILE__, __LINE__,
+ pango_font_description_to_string (xr->fonts[XR_FONT_FIXED].desc));
+ printf ("%s:%d Prop \"%s\"\n", __FILE__, __LINE__,
+ pango_font_description_to_string (xr->fonts[XR_FONT_PROPORTIONAL].desc));
+ printf ("%s:%d Emph \"%s\"\n", __FILE__, __LINE__,
+ pango_font_description_to_string (xr->fonts[XR_FONT_EMPHASIS].desc));
+ }
+
xr->line_gutter = XR_POINT;
xr->line_space = XR_POINT;
xr->line_width = XR_POINT / 2;
@@ -284,6 +313,11 @@ apply_options (struct xr_driver *xr, struct string_map *o)
xr->width = paper_width - xr->left_margin - xr->right_margin;
xr->length = paper_length - xr->top_margin - xr->bottom_margin;
+
+ if (string_map_find (o, "printing"))
+ {
+ printf ("%s:%d Width %d; Length %d\n", __FILE__, __LINE__, xr->width, xr->length);
+ }
}
static struct xr_driver *
@@ -349,6 +383,10 @@ xr_set_cairo (struct xr_driver *xr, cairo_t *cairo)
xr->char_height = MAX (xr->char_height, char_height);
}
+ printf ("%s:%d Char Width: %d; Char Height %d\n", __FILE__, __LINE__,
+ xr->char_width, xr->char_height);
+
+
g_object_unref (G_OBJECT (context));
if (xr->params == NULL)
diff --git a/src/ui/gui/psppire-output-window.c b/src/ui/gui/psppire-output-window.c
index d1d7e89..7529d9d 100644
--- a/src/ui/gui/psppire-output-window.c
+++ b/src/ui/gui/psppire-output-window.c
@@ -1082,6 +1082,11 @@ create_xr_print_driver (GtkPrintContext *context, PsppireOutputWindow *window)
string_map_insert_nocopy (&options, xstrdup ("bottom-margin"),
c_xasprintf ("%.2fmm", bottom_margin));
+ string_map_insert (&options, xstrdup ("printing"), "yes");
+
+ printf ("%s:%d Width: %g; Height: %g\n", __FILE__, __LINE__,
+ width, height);
+
window->print_xrd =
xr_driver_create (gtk_print_context_get_cairo_context (context), &options);
signature.asc
Description: Digital signature
_______________________________________________ pspp-dev mailing list [email protected] https://lists.gnu.org/mailman/listinfo/pspp-dev
