[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Another possible bug in src/output/cairo.c

From: John Darrington
Subject: Another possible bug in src/output/cairo.c
Date: Mon, 14 Jan 2013 19:41:58 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

There are the lines:

  xr->left_margin = parse_dimension (opt (d, o, "left-margin", ".5in"));
  xr->right_margin = parse_dimension (opt (d, o, "right-margin", ".5in"));
  xr->top_margin = parse_dimension (opt (d, o, "top-margin", ".5in"));
  xr->bottom_margin = parse_dimension (opt (d, o, "bottom-margin", ".5in"));

Now the comment to parse_dimension says the return value is in 1/72000 of an 
That is in 1/1000 of a point.

Later there is code like:

      cairo_translate (cairo,
                       xr_to_pt (xr->left_margin),
                       xr_to_pt (xr->top_margin));

and xr_to_pt is defined as:

/* Conversions to and from points. */
static double
xr_to_pt (int x)
  return x / (double) PANGO_SCALE;

This would be correct if PANGO_SCALE was 1000  but on my system it is defined as

Is there an error here somewhere?


PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]