mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug #631611 - Check printing fails because fonts are too tiny on Windows
Lesson learned: don't use cairo_identity_matrix on a cairo_t managed by GtkPrintContext. It kills a number of transformations that were already configured by GtkPrintContext. On Windows this breaks proper scaling. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22243 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
58277b4cdd
commit
fe043bf731
@ -2271,7 +2271,6 @@ draw_check_format(GtkPrintContext *context, gint position,
|
||||
gdouble x, y, r, multip;
|
||||
|
||||
cr = gtk_print_context_get_cairo_context(context);
|
||||
cairo_identity_matrix(cr);
|
||||
cairo_translate(cr, format->trans_x, format->trans_y);
|
||||
g_debug("Page translated by %f,%f", format->trans_x, format->trans_y);
|
||||
cairo_rotate(cr, format->rotation * DEGREES_TO_RADIANS);
|
||||
@ -2286,15 +2285,19 @@ draw_check_format(GtkPrintContext *context, gint position,
|
||||
pcd->default_font);
|
||||
}
|
||||
|
||||
/* Translate all subsequent check items if requested. */
|
||||
if ((position >= 0) && (position < pcd->position_max))
|
||||
/* Translate all subsequent check items if requested.
|
||||
* For check position 0, no translation is needed. */
|
||||
if ((position > 0) && (position < pcd->position_max))
|
||||
{
|
||||
y = format->height * position;
|
||||
cairo_translate(cr, 0, y);
|
||||
g_debug("Position translated by %f (pre-defined)", y);
|
||||
/* Standard positioning is used.
|
||||
* Note that the first check on the page (position 0) doesn't
|
||||
* need to be moved (hence the test for position > 0 above. */
|
||||
cairo_translate(cr, 0, format->height);
|
||||
g_debug("Position %d translated by %f (pre-defined)", position, format->height);
|
||||
}
|
||||
else
|
||||
else if (position == pcd->position_max)
|
||||
{
|
||||
/* Custom positioning is used. */
|
||||
multip = pcd_get_custom_multip(pcd);
|
||||
x = multip * gtk_spin_button_get_value(pcd->translation_x);
|
||||
y = multip * gtk_spin_button_get_value(pcd->translation_y);
|
||||
|
Loading…
Reference in New Issue
Block a user