GNOME Bugzilla – Bug 314123
Subtitle font changing is not implemented in xine-lib version
Last modified: 2007-06-17 19:57:57 UTC
Distribution/Version: Ubuntu bacon_video_widget_set_subtitle_font (BaconVideoWidget *bvw, const char *font) { //FIXME } This makes it impossible to change the subtitle font when using xine as a backend.
True, that would be because the xine-lib backend doesn't use Pango, so can make no use of the font description.
Should be possible to fake it though: These are the enums in src/libsputext/xine_decoder.c: typedef enum { SUBTITLE_SIZE_TINY = 0, SUBTITLE_SIZE_SMALL, SUBTITLE_SIZE_NORMAL, SUBTITLE_SIZE_LARGE, SUBTITLE_SIZE_VERY_LARGE, SUBTITLE_SIZE_HUGE, SUBTITLE_SIZE_NUM /* number of values in enum */ } subtitle_size; static int sizes[SUBTITLE_SIZE_NUM] = { 16, 20, 24, 32, 48, 64 }; Setting the font for "subtitles.separate.font" will be much harder... Somebody needs to implement a fontconfig loader for xine-lib.
*** Bug 335660 has been marked as a duplicate of this bug. ***
Filed upstream: https://sourceforge.net/tracker/index.php?func=detail&aid=1551042&group_id=9655&atid=109655
https://launchpad.net/distros/ubuntu/+source/totem/+bug/28570 has a but about that too.
I'm wondering or someone already is going to fix this bug? Because in Totem 2.17.92 it still isn't solved and we're already 1.5 years further since the first report. I would like to fix it myself, but I think I don't know enough of Xine and Totem.
Created attachment 84015 [details] [review] Subtitle fontsize patch I've tried to fix it by myself. I did it on the way Bastien suggest, to fake it. I've also include another patch, this make Totem search for subtitles in the subdirectories defined in subtitle_subdir. For example when having a movie movie.avi and a subtitle movie.srt in the sub directory subtitles. Totem will load that subtitle. Actually I'm not the best C-programmer, but the patches do work.
It's not a Totem bug, xine-lib doesn't implement it, so Totem can't either. This bug is only opened to remind myself to implement the Totem bit of the code once xine-lib supports it.
Is there any chance that Xine is going to support this (the sourceforge url above doesn't work anymore btw)? Maybe it's better to fake like you suggest.
Created attachment 84960 [details] [review] totem-xine-use-user-set-font.patch Updated patch, without the horrible atoi. It also sets the font, but the Freetype code in xine-lib doesn't seem to fall back if the font doesn't exist.
2007-03-20 Bastien Nocera <hadess@hadess.net> * src/backend/bacon-video-widget-xine.c: (bacon_video_widget_set_subtitle_font): Set the font and font size depending on the preferences, only works if xine-lib is compiled with Freetype support (otherwise you get no subtitles at all), based on patch by Robert Krebbers <robbertkrebbers@xs4all.nl> (Closes: #314123) This only works when xine-lib is compiled with Freetype support, or you'll end up without any subtitles at all: https://sourceforge.net/tracker/?func=detail&atid=109655&aid=1684294&group_id=9655 I also requested Livna to compile xine-lib with Freetype support. Please ask your distributions to do the same: http://bugzilla.livna.org/show_bug.cgi?id=1447
*** Bug 448522 has been marked as a duplicate of this bug. ***