From 73f5e4fe62e13a449a6e89c921ec5fa26fb9c70c Mon Sep 17 00:00:00 2001 From: Young-Ho Cha Date: Fri, 28 Apr 2006 13:35:34 +0000 Subject: [PATCH] ext/pango/gsttextoverlay.c: Don't strip newlines from the text. Also, center lines within multi-line paragraphs (#339... Original commit message from CVS: Patch by: Young-Ho Cha * ext/pango/gsttextoverlay.c: (gst_text_overlay_init), (gst_text_overlay_render_text): Don't strip newlines from the text. Also, center lines within multi-line paragraphs (#339405). --- ChangeLog | 9 +++++++++ ext/pango/gsttextoverlay.c | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e553bf6..163def2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2006-04-28 Tim-Philipp Müller + Patch by: Young-Ho Cha + + * ext/pango/gsttextoverlay.c: (gst_text_overlay_init), + (gst_text_overlay_render_text): + Don't strip newlines from the text. Also, center lines + within multi-line paragraphs (#339405). + +2006-04-28 Tim-Philipp Müller + * gst/typefind/gsttypefindfunctions.c: (wavpack_type_find): Fix wavpack typefinding to work in more cases (don't peek for chunks of multiple hundred kBs at once, but process diff --git a/ext/pango/gsttextoverlay.c b/ext/pango/gsttextoverlay.c index 5cc4c6f..7738b7f 100644 --- a/ext/pango/gsttextoverlay.c +++ b/ext/pango/gsttextoverlay.c @@ -436,6 +436,7 @@ gst_text_overlay_init (GstTextOverlay * overlay, GstTextOverlayClass * klass) overlay->layout = pango_layout_new (GST_TEXT_OVERLAY_GET_CLASS (overlay)->pango_context); + pango_layout_set_alignment (overlay->layout, PANGO_ALIGN_CENTER); memset (&overlay->bitmap, 0, sizeof (overlay->bitmap)); overlay->halign = DEFAULT_PROP_HALIGNMENT; @@ -950,7 +951,7 @@ gst_text_overlay_render_text (GstTextOverlay * overlay, } else { /* empty string */ string = g_strdup (" "); } - g_strdelimit (string, "\n\r\t", ' '); + g_strdelimit (string, "\r\t", ' '); textlen = strlen (string); /* FIXME: should we check for UTF-8 here? */ -- 2.7.4