GNOME Bugzilla – Bug 339405
[textoverlay] can't display '\n' character
Last modified: 2006-04-28 13:35:58 UTC
Please describe the problem: pango text overlay plugin can't display '\n' character. subparse plugin can produce '\n', but pango plugin replace '\n' to space character. so it can't display. Steps to reproduce: 1. play a video file with subtitle 2. 3. Actual results: Expected results: Does this happen every time? yes Other information: gst_text_overlay_render_text() at ext/pango/gsttextoverlay.c:953 replace '\n', '\r' and '\t' characters to ' ' character like this. g_strdelimit (string, "\n\r\t", ' '); it need to change to g_strdelimit (string, "\r\t", ' ');
Actual results: http://ftp.mizi.com/~ganadist/totem_cant_render_cr.png Expected results: http://ftp.mizi.com/~ganadist/totem_render_cr.png finally, when render multiline text, if render with center align, it looks better. http://ftp.mizi.com/~ganadist/totem_aligned_center.png
Created attachment 64109 [details] [review] can display '\n' and align center
Indeed, I don't really know why '\n' is in the list of characters to be replaced. Don't think that was on purpose. Will commit when -base is unfrozen again (ie. after the release). Center alignment for paragraphs with multiple lines of text seems fine as well.
Committed, thanks for the patch: 2006-04-28 Tim-Philipp Müller <tim at centricular dot net> Patch by: Young-Ho Cha <ganadist at chollian net> * 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).