cairo: Add .5pt gutter around table rules.
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 18 Oct 2014 19:11:34 +0000 (12:11 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 18 Oct 2014 19:11:34 +0000 (12:11 -0700)
Commit d3fef25674baf4f4 (output: Add footnote support.) removed the 3-pt
gutter around table rules, instead putting a margin around cell contents.
This usually worked out fine, but for some tables in the GUI it caused the
rightmost rule in the table to disappear.  This is probably some kind of
off-by-one error in table size computation or clipping.  We may have to
eventually resolve that.  However, this commit seems like an adequate
temporary fix: instead of fixing the off-by-one error, add a thin gutter
around the rules, so that the actual content of the rule doesn't get
clipped off.

src/output/cairo.c

index 9a0cb6797e5f7d309c16e4eac5e95ff294eb8276..f61fe6b0764eff304cf0f2f40a8b19ae0f67a6d9 100644 (file)
@@ -287,7 +287,7 @@ apply_options (struct xr_driver *xr, struct string_map *o)
   xr->fonts[XR_FONT_MARKER].desc = parse_font (d, o, "marker-font", "serif",
                                                font_size * PANGO_SCALE_X_SMALL);
 
-  xr->line_gutter = 0;
+  xr->line_gutter = XR_POINT / 2;
   xr->line_space = XR_POINT;
   xr->line_width = XR_POINT / 2;
   xr->page_number = 0;