summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--pango-view/viewer-render.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index e478b75f..48dd6759 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-02 Mathias Hasselmann <mathias.hasselmann@gmx.de>
+
+ * pango-view/viewer-render.c (make_layout), (parse_options):
+ Add --justify.
+
2007-05-02 Behdad Esfahbod <behdad@gnome.org>
Bug 355789 – Pango misaligns word-wrapped text due to trailing
diff --git a/pango-view/viewer-render.c b/pango-view/viewer-render.c
index 4280e227..4ab93c12 100644
--- a/pango-view/viewer-render.c
+++ b/pango-view/viewer-render.c
@@ -54,6 +54,7 @@ const char *opt_text = NULL;
gboolean opt_waterfall = FALSE;
int opt_width = -1;
int opt_indent = 0;
+gboolean opt_justify = 0;
int opt_runs = 1;
PangoAlignment opt_align = PANGO_ALIGN_LEFT;
PangoEllipsizeMode opt_ellipsize = PANGO_ELLIPSIZE_NONE;
@@ -112,6 +113,7 @@ make_layout(PangoContext *context,
pango_layout_set_auto_dir (layout, opt_auto_dir);
pango_layout_set_ellipsize (layout, opt_ellipsize);
+ pango_layout_set_justify (layout, opt_justify);
font_description = get_font_description ();
if (size > 0)
@@ -583,6 +585,8 @@ parse_options (int argc, char *argv[])
"Hinting style", "none/auto/full"},
{"indent", 0, 0, G_OPTION_ARG_INT, &opt_indent,
"Width in points to indent paragraphs", "points"},
+ {"justify", 0, 0, G_OPTION_ARG_NONE, &opt_justify,
+ "Align paragraph lines to be justified", NULL},
{"margin", 0, 0, G_OPTION_ARG_INT, &opt_margin,
"Set the margin on the output in pixels", "pixels"},
{"markup", 0, 0, G_OPTION_ARG_NONE, &opt_markup,