summaryrefslogtreecommitdiff
path: root/pango-view
diff options
context:
space:
mode:
authorMathias Hasselmann <mathias.hasselmann@gmx.de>2007-05-02 07:37:09 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2007-05-02 07:37:09 +0000
commit2eec510f3f474a47bff87b8d021e75152a4d9884 (patch)
treea7dff340b5eef2b7dfd34dfae0ffa04d53e05965 /pango-view
parent8aa52af0fc687293abe4a316e5a58d38f7ea6628 (diff)
downloadpango-2eec510f3f474a47bff87b8d021e75152a4d9884.tar.gz
Add --justify.
2007-05-02 Mathias Hasselmann <mathias.hasselmann@gmx.de> * pango-view/viewer-render.c (make_layout), (parse_options): Add --justify. svn path=/trunk/; revision=2249
Diffstat (limited to 'pango-view')
-rw-r--r--pango-view/viewer-render.c4
1 files changed, 4 insertions, 0 deletions
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,