mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
pango: bump pango requirement to stable version and remove ifdefs
Bump pango requirement from an ancient development version to an ancient stable version.
This commit is contained in:
parent
65765dffbf
commit
550b6fa0c1
2 changed files with 2 additions and 20 deletions
|
@ -591,10 +591,7 @@ AG_GST_CHECK_FEATURE(OGG, [Xiph Ogg library], ogg, [
|
|||
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])
|
||||
], true)
|
||||
AG_GST_PKG_CHECK_MODULES(PANGO, pango >= 1.16.0 pangocairo >= 1.16.0)
|
||||
])
|
||||
|
||||
dnl *** theora ***
|
||||
|
|
|
@ -466,12 +466,10 @@ gst_text_overlay_class_init (GstTextOverlayClass * klass)
|
|||
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
|
||||
|
@ -633,7 +631,6 @@ gst_text_overlay_update_wrap_mode (GstTextOverlay * overlay)
|
|||
static void
|
||||
gst_text_overlay_update_render_mode (GstTextOverlay * overlay)
|
||||
{
|
||||
#if HAVE_PANGO_VERTICAL_WRITING
|
||||
PangoMatrix matrix = PANGO_MATRIX_INIT;
|
||||
PangoContext *context = pango_layout_get_context (overlay->layout);
|
||||
|
||||
|
@ -645,11 +642,8 @@ gst_text_overlay_update_render_mode (GstTextOverlay * overlay)
|
|||
} else {
|
||||
pango_context_set_base_gravity (context, PANGO_GRAVITY_SOUTH);
|
||||
pango_context_set_matrix (context, &matrix);
|
||||
#endif
|
||||
pango_layout_set_alignment (overlay->layout, overlay->line_align);
|
||||
#if HAVE_PANGO_VERTICAL_WRITING
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -812,11 +806,9 @@ gst_text_overlay_set_property (GObject * object, guint prop_id,
|
|||
overlay->need_render = TRUE;
|
||||
}
|
||||
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);
|
||||
|
@ -875,11 +867,7 @@ gst_text_overlay_get_property (GObject * object, guint prop_id,
|
|||
g_value_set_boolean (value, overlay->auto_adjust_size);
|
||||
break;
|
||||
case PROP_VERTICAL_RENDER:
|
||||
#ifdef HAVE_PANGO_VERTICAL_WRITING
|
||||
g_value_set_boolean (value, overlay->use_vertical_render);
|
||||
#else
|
||||
g_value_set_boolean (value, FALSE);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
|
@ -1206,7 +1194,6 @@ gst_text_overlay_render_pangocairo (GstTextOverlay * overlay,
|
|||
if (height > overlay->height) {
|
||||
height = overlay->height;
|
||||
}
|
||||
#ifdef HAVE_PANGO_VERTICAL_WRITING
|
||||
if (overlay->use_vertical_render) {
|
||||
PangoRectangle rect;
|
||||
PangoContext *context;
|
||||
|
@ -1237,9 +1224,7 @@ gst_text_overlay_render_pangocairo (GstTextOverlay * overlay,
|
|||
tmp = height;
|
||||
height = width;
|
||||
width = tmp;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
cairo_matrix_init_scale (&cairo_matrix, scalef, scalef);
|
||||
}
|
||||
/* clear shadow surface */
|
||||
|
|
Loading…
Reference in a new issue