From 13d91b755ed1045e2c1183874b3752b07489b922 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 4 Feb 2010 21:06:13 -0800 Subject: [PATCH] Make text output left-justified in ascii and cairo drivers. This only makes a difference for text output that wraps across lines, for example with long error messages. --- src/output/ascii.c | 3 ++- src/output/cairo.c | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/output/ascii.c b/src/output/ascii.c index 85c31c18..14ec71f2 100644 --- a/src/output/ascii.c +++ b/src/output/ascii.c @@ -523,7 +523,8 @@ ascii_submit (struct output_driver *driver, { struct table_item *item; - item = table_item_create (table_from_string (0, text), NULL); + item = table_item_create (table_from_string (TAB_LEFT, text), + NULL); ascii_submit (&a->driver, &item->output_item); table_item_unref (item); } diff --git a/src/output/cairo.c b/src/output/cairo.c index 61287803..ba94cc53 100644 --- a/src/output/cairo.c +++ b/src/output/cairo.c @@ -487,7 +487,8 @@ xr_submit (struct output_driver *driver, const struct output_item *output_item) { struct table_item *item; - item = table_item_create (table_from_string (0, text), NULL); + item = table_item_create (table_from_string (TAB_LEFT, text), + NULL); xr_submit (&xr->driver, &item->output_item); table_item_unref (item); } @@ -945,7 +946,8 @@ xr_rendering_create (struct xr_driver *xr, const struct output_item *item, const char *text = text_item_get_text (text_item); struct table_item *table_item; - table_item = table_item_create (table_from_string (0, text), NULL); + table_item = table_item_create (table_from_string (TAB_LEFT, text), + NULL); r = xr_rendering_create (xr, &table_item->output_item, cr); table_item_unref (table_item); } -- 2.30.2