# HG changeset patch # User arpi # Date 1041025300 0 # Node ID 4c18c4e7f34e9578521dd9bb716451b281474412 # Parent 24cc8654c0698e9069127fbfa43b21a486b0cd2a -subwidth diff -r 24cc8654c069 -r 4c18c4e7f34e DOCS/mplayer.1 --- a/DOCS/mplayer.1 Fri Dec 27 19:36:20 2002 +0000 +++ b/DOCS/mplayer.1 Fri Dec 27 21:41:40 2002 +0000 @@ -908,6 +908,10 @@ Specify the position of subtitles on the screen. The value is the vertical position of the subtitle in % of the screen height. .TP +.B \-subwidth <10\-100> +Specify the maximum width of subtitles on the screen. Useful for TV-out. +The value is the width of the subtitle in % of the screen width. +.TP .B \-unicode Tells MPlayer to handle the subtitle file as UNICODE. .TP diff -r 24cc8654c069 -r 4c18c4e7f34e cfg-common.h --- a/cfg-common.h Fri Dec 27 19:36:20 2002 +0000 +++ b/cfg-common.h Fri Dec 27 21:41:40 2002 +0000 @@ -186,6 +186,7 @@ {"font", &font_name, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"ffactor", &font_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 10.0, NULL}, {"subpos", &sub_pos, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL}, + {"subwidth", &sub_width_p, CONF_TYPE_INT, CONF_RANGE, 10, 100, NULL}, #ifdef HAVE_FREETYPE {"subfont-encoding", &subtitle_font_encoding, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"subfont-text-scale", &text_font_scale_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL}, diff -r 24cc8654c069 -r 4c18c4e7f34e libvo/sub.c --- a/libvo/sub.c Fri Dec 27 19:36:20 2002 +0000 +++ b/libvo/sub.c Fri Dec 27 21:41:40 2002 +0000 @@ -37,6 +37,7 @@ int sub_unicode=0; int sub_utf8=0; int sub_pos=100; +int sub_width_p=100; int sub_alignment=0; /* 0=top, 1=center, 2=bottom */ int sub_visibility=1; @@ -374,7 +375,7 @@ } obj->params.subtitle.utbl[k++]=c; xsize+=vo_font->width[c]+vo_font->charspace+kerning(vo_font,prevc,c); - if (dxs0){ j=lastStripPosition; diff -r 24cc8654c069 -r 4c18c4e7f34e libvo/sub.h --- a/libvo/sub.h Fri Dec 27 19:36:20 2002 +0000 +++ b/libvo/sub.h Fri Dec 27 21:41:40 2002 +0000 @@ -97,6 +97,7 @@ extern char *sub_cp; #endif extern int sub_pos; +extern int sub_width_p; extern int sub_alignment; extern int sub_visibility; extern int suboverlap_enabled;