diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2005-11-09 07:43:09 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2005-11-09 07:43:09 +0000 |
commit | a671bf6772c2341ecb3bef9f6b0671603d2f9619 (patch) | |
tree | 44b0661219d21e3bd3e66a933cb06978a3ae0ec3 /examples | |
parent | ba2a78f0035834cd4031daa3d9097378affea072 (diff) | |
download | pango-a671bf6772c2341ecb3bef9f6b0671603d2f9619.tar.gz |
Set layout wrapping to PANGO_WRAP_WORD_CHAR if width is set for the
2005-11-09 Behdad Esfahbod <behdad@gnome.org>
* examples/renderdemo.c (make_layout): Set layout wrapping to
PANGO_WRAP_WORD_CHAR if width is set for the layout. Setting width
didn't have any effect previously.
* pango/pango-layout.c (process_item): Remove the excess
letter_spacing adjustment on the item width. (#168593, Damon Chaplin)
* pango/pango-markup.c (pango_parse_markup), pango/querymodules.c:
Replace g_string_new ("") with g_string_new (NULL).
* pango/pangoft2.c: Use g_malloc'ed memory for unknown FreeType2
error, instead of static buffer.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/renderdemo.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/renderdemo.c b/examples/renderdemo.c index 07ca1615..a956e3c6 100644 --- a/examples/renderdemo.c +++ b/examples/renderdemo.c @@ -111,7 +111,10 @@ make_layout(PangoContext *context, pango_font_description_set_size (font_description, size * PANGO_SCALE); if (opt_width > 0) - pango_layout_set_width (layout, (opt_width * opt_dpi * PANGO_SCALE + 32) / 72); + { + pango_layout_set_wrap (layout, PANGO_WRAP_WORD_CHAR); + pango_layout_set_width (layout, (opt_width * opt_dpi * PANGO_SCALE + 32) / 72); + } if (opt_indent != 0) pango_layout_set_indent (layout, (opt_indent * opt_dpi * PANGO_SCALE + 32) / 72); |