pango: Check if pangocairo supports vertical rendering and fix properties

This commit is contained in:
Sebastian Dröge 2009-08-04 11:58:45 +02:00
parent d3baacc32a
commit 20b84cda60
2 changed files with 6 additions and 4 deletions

View file

@ -591,6 +591,7 @@ dnl *** pango ***
translit(dnm, m, l) AM_CONDITIONAL(USE_PANGO, true)
AG_GST_CHECK_FEATURE(PANGO, [Pango font rendering], pango, [
AG_GST_PKG_CHECK_MODULES(PANGO, pango pangocairo)
PKG_CHECK_MODULES(PANGOCAIRO_1_15_4, pangocairo >= 1.15.4, [ AC_DEFINE(HAVE_PANGO_VERTICAL_WRITING, 1, [Defined if pango can write vertically])])
])
dnl *** theora ***

View file

@ -450,11 +450,13 @@ gst_text_overlay_class_init (GstTextOverlayClass * klass)
"Automatically adjust font size to screen-size.",
DEFAULT_PROP_AUTO_ADJUST_SIZE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
#ifdef HAVE_PANGO_VERTICAL_WRITING
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_VERTICAL_RENDER,
g_param_spec_boolean ("vertical-render", "vertical render",
"Vertical Render.", DEFAULT_PROP_VERTICAL_RENDER,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
#endif
}
static void
@ -793,14 +795,13 @@ gst_text_overlay_set_property (GObject * object, guint prop_id,
overlay->auto_adjust_size = g_value_get_boolean (value);
overlay->need_render = TRUE;
}
#ifdef HAVE_PANGO_VERTICAL_WRITING
case PROP_VERTICAL_RENDER:
{
#ifdef HAVE_PANGO_VERTICAL_WRITING
overlay->use_vertical_render = g_value_get_boolean (value);
gst_text_overlay_update_render_mode (overlay);
overlay->need_render = TRUE;
}
#endif
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;