After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 314123 - Subtitle font changing is not implemented in xine-lib version
Subtitle font changing is not implemented in xine-lib version
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: xine-lib backend
1.1.x
Other Linux
: Normal enhancement
: ---
Assigned To: Maintainer alias for xine-lib component of Totem
Maintainer alias for xine-lib component of Totem
: 335660 SuA (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-08-21 21:47 UTC by aigarius
Modified: 2007-06-17 19:57 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
Subtitle fontsize patch (3.24 KB, patch)
2007-03-05 21:36 UTC, Robbert
none Details | Review
totem-xine-use-user-set-font.patch (1.37 KB, patch)
2007-03-20 12:15 UTC, Bastien Nocera
none Details | Review

Description aigarius 2005-08-21 21:47:12 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.
Comment 1 Bastien Nocera 2005-09-13 19:52:06 UTC
True, that would be because the xine-lib backend doesn't use Pango, so can make
no use of the font description.
Comment 2 Bastien Nocera 2005-10-23 00:49:36 UTC
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.
Comment 3 Bastien Nocera 2006-03-27 12:09:07 UTC
*** Bug 335660 has been marked as a duplicate of this bug. ***
Comment 5 Daniel Holbach 2006-09-26 09:51:07 UTC
https://launchpad.net/distros/ubuntu/+source/totem/+bug/28570 has a but about that too.
Comment 6 Robbert 2007-03-05 17:47:35 UTC
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.
Comment 7 Robbert 2007-03-05 21:36:44 UTC
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.
Comment 8 Bastien Nocera 2007-03-05 22:46:35 UTC
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.
Comment 9 Robbert 2007-03-06 10:09:51 UTC
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. 
Comment 10 Bastien Nocera 2007-03-20 12:15:42 UTC
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.
Comment 11 Bastien Nocera 2007-03-20 12:36:45 UTC
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
Comment 12 Bastien Nocera 2007-06-17 19:57:57 UTC
*** Bug 448522 has been marked as a duplicate of this bug. ***