summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-08-15 21:10:56 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-08-15 21:10:56 +0000
commit39a80ded9e79d92b70c5903ac9d4a3ae594f2fbb (patch)
treef84ed3f3da961cd3be2623eca3c9d60c1496c26e /examples
parent4adf7dea1e8ecedb3bf9325be46c19c0167e0009 (diff)
downloadpango-39a80ded9e79d92b70c5903ac9d4a3ae594f2fbb.tar.gz
Render the header with SOUTH gravity.
2006-08-15 Behdad Esfahbod <behdad@gnome.org> * examples/renderdemo.c (do_output): Render the header with SOUTH gravity. * pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_metrics), (pango_cairo_fc_font_glyph_extents_cache_init): Center baseline for east/west gravity in pango_font_metrics too.
Diffstat (limited to 'examples')
-rw-r--r--examples/renderdemo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/renderdemo.c b/examples/renderdemo.c
index e77ddcec..2bf6ce29 100644
--- a/examples/renderdemo.c
+++ b/examples/renderdemo.c
@@ -277,11 +277,11 @@ do_output (PangoContext *context,
pango_context_set_language (context, pango_language_from_string ("en_US"));
pango_context_set_base_dir (context,
opt_rtl ? PANGO_DIRECTION_RTL : PANGO_DIRECTION_LTR);
- pango_context_set_base_gravity (context, opt_gravity);
if (opt_header)
{
char *options_string = get_options_string ();
+ pango_context_set_base_gravity (context, PANGO_GRAVITY_SOUTH);
layout = make_layout (context, options_string, 10);
pango_layout_get_extents (layout, NULL, &logical_rect);
@@ -305,6 +305,8 @@ do_output (PangoContext *context,
g_printerr ("The backend does not support rotated text\n");
}
+ pango_context_set_base_gravity (context, opt_gravity);
+
set_transform (context, transform_cb, cb_context, cb_data, &matrix);
output_body (context,
@@ -619,7 +621,6 @@ parse_options (int argc, char *argv[])
GError *parse_error = NULL;
GOptionContext *context;
size_t len;
- char *p;
prog_name = g_path_get_basename (argv[0]);
context = g_option_context_new ("- FILE");