summaryrefslogtreecommitdiff
path: root/utils/viewer-render.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/viewer-render.c')
-rw-r--r--utils/viewer-render.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/utils/viewer-render.c b/utils/viewer-render.c
index 5a556cd8..8fd6cfaf 100644
--- a/utils/viewer-render.c
+++ b/utils/viewer-render.c
@@ -52,7 +52,7 @@ int opt_width = -1;
int opt_height = -1;
int opt_indent = 0;
int opt_spacing = 0;
-double opt_line_spacing = 0.0;
+double opt_line_spacing = -1.0;
gboolean opt_justify = 0;
int opt_runs = 1;
PangoAlignment opt_align = PANGO_ALIGN_LEFT;
@@ -125,9 +125,11 @@ make_layout(PangoContext *context,
pango_layout_set_indent (layout, (opt_indent * opt_dpi * PANGO_SCALE + 36) / 72);
if (opt_spacing != 0)
- pango_layout_set_spacing (layout, (opt_spacing * opt_dpi * PANGO_SCALE + 36) / 72);
-
- if (opt_line_spacing != 0.0)
+ {
+ pango_layout_set_spacing (layout, (opt_spacing * opt_dpi * PANGO_SCALE + 36) / 72);
+ pango_layout_set_line_spacing (layout, 0.0);
+ }
+ if (opt_line_spacing >= 0.0)
pango_layout_set_line_spacing (layout, (float)opt_line_spacing);
align = opt_align;