1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 01:52:19 +00:00

-subwidth

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8584 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-12-27 21:41:40 +00:00
parent 971294ed0e
commit 501706292e
4 changed files with 8 additions and 1 deletions

View File

@ -908,6 +908,10 @@ Same as \-audiofile, but for subtitle streams (OggDS?).
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

View File

@ -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},

View File

@ -37,6 +37,7 @@ unsigned char* vo_osd_text=NULL;
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 @@ inline static void vo_update_text_sub(mp_osd_obj_t* obj,int dxs,int dys){
}
obj->params.subtitle.utbl[k++]=c;
xsize+=vo_font->width[c]+vo_font->charspace+kerning(vo_font,prevc,c);
if (dxs<xsize){
if (dxs*sub_width_p/100<xsize){
prevc = -1;
if (lastStripPosition>0){
j=lastStripPosition;

View File

@ -97,6 +97,7 @@ extern int sub_utf8;
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;