summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-23 21:23:53 +0200
committerwm4 <wm4@nowhere>2012-10-24 21:56:35 +0200
commita8824f12ddfe66585db43fb0f92d7c90b5bbd19d (patch)
tree15398c26109890e8afd077d3d9d4fcf1bede7110
parent2afd7ebb4e96b91cc552fff5badf237dadb28212 (diff)
downloadmpv-a8824f12ddfe66585db43fb0f92d7c90b5bbd19d.tar.bz2
mpv-a8824f12ddfe66585db43fb0f92d7c90b5bbd19d.tar.xz
options: remove --subfont-autoscale (changes default font scale)
The code for this option attempted to emulate the old as-documented behavior. It wasn't very good at it, and now that the old OSD code has been removed, it's entirely pointless. This removes the factor 1.7 with which --subfont-text-scale was multiplied.
-rw-r--r--DOCS/man/en/options.rst12
-rw-r--r--cfg-mplayer.h1
-rw-r--r--sub/ass_mp.c11
-rw-r--r--sub/osd_libass.c14
-rw-r--r--sub/sub.c7
-rw-r--r--sub/sub.h1
6 files changed, 2 insertions, 44 deletions
diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst
index 01a4610e20..dbd37c4c03 100644
--- a/DOCS/man/en/options.rst
+++ b/DOCS/man/en/options.rst
@@ -1900,18 +1900,6 @@
Sets the subtitle font (see ``--font``). If no ``--subfont`` is given,
``--font`` is used for subtitles too.
---subfont-autoscale=<0-3>
- Sets the autoscale mode.
-
- *NOTE*: 0 means that text scale and OSD scale are font heights in points.
-
- The mode can be:
-
- :0: no autoscale
- :1: proportional to movie height
- :2: proportional to movie width
- :3: proportional to movie diagonal (default)
-
--subfont-text-scale=<0-100>
Sets the subtitle text autoscale coefficient as percentage of the screen
size (default: 3.5).
diff --git a/cfg-mplayer.h b/cfg-mplayer.h
index ef76cdc079..b944b833e3 100644
--- a/cfg-mplayer.h
+++ b/cfg-mplayer.h
@@ -529,7 +529,6 @@ const m_option_t common_opts[] = {
{"ffactor", &font_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 10.0, NULL},
{"sub-pos", &sub_pos, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
{"subfont-text-scale", &text_font_scale_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL},
- {"subfont-autoscale", &subtitle_autoscale, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL},
OPT_MAKE_FLAGS("ass", ass_enabled, 0),
OPT_FLOATRANGE("ass-font-scale", ass_font_scale, 0, 0, 100),
OPT_FLOATRANGE("ass-line-spacing", ass_line_spacing, 0, -1000, 1000),
diff --git a/sub/ass_mp.c b/sub/ass_mp.c
index c4c418d5ba..1867880f38 100644
--- a/sub/ass_mp.c
+++ b/sub/ass_mp.c
@@ -61,17 +61,6 @@ ASS_Track *mp_ass_default_track(ASS_Library *library, struct MPOpts *opts)
style->treat_fontname_as_pattern = 1;
double fs = track->PlayResY * text_font_scale_factor / 100.;
- /* The font size is always proportional to video height only;
- * real -subfont-autoscale behavior is not implemented.
- * Apply a correction that corresponds to about 4:3 aspect ratio
- * video to get a size somewhat closer to what non-libass rendering
- * would produce with the same text_font_scale_factor
- * and subtitle_autoscale.
- */
- if (subtitle_autoscale == 2)
- fs *= 1.3;
- else if (subtitle_autoscale == 3)
- fs *= 1.7;
uint32_t c1 = 0xFFFFFF00;
uint32_t c2 = 0x00000000;
diff --git a/sub/osd_libass.c b/sub/osd_libass.c
index 4a6a0c88cb..5f17f2fa6f 100644
--- a/sub/osd_libass.c
+++ b/sub/osd_libass.c
@@ -65,19 +65,7 @@ static void update_font_style(ASS_Track *track, ASS_Style *style, double factor)
style->Encoding = -1;
// duplicated from ass_mp.c
- double fs = track->PlayResY * factor / 100.;
- /* The font size is always proportional to video height only;
- * real -subfont-autoscale behavior is not implemented.
- * Apply a correction that corresponds to about 4:3 aspect ratio
- * video to get a size somewhat closer to what non-libass rendering
- * would produce with the same text_font_scale_factor
- * and subtitle_autoscale.
- */
- if (subtitle_autoscale == 2)
- fs *= 1.3;
- else if (subtitle_autoscale == 3)
- fs *= 1.7;
- style->FontSize = fs;
+ style->FontSize = track->PlayResY * factor / 100.;
style->Outline = style->FontSize / 16;
}
diff --git a/sub/sub.c b/sub/sub.c
index 04fbcd877c..bba53c926f 100644
--- a/sub/sub.c
+++ b/sub/sub.c
@@ -64,12 +64,7 @@ int sub_pos=100;
int sub_visibility=1;
subtitle* vo_sub=NULL;
-float text_font_scale_factor = 3.5;
-// 0 = no autoscale
-// 1 = video height
-// 2 = video width
-// 3 = diagonal
-int subtitle_autoscale = 3;
+float text_font_scale_factor = 6;
char *font_name = NULL;
char *sub_font_name = NULL;
diff --git a/sub/sub.h b/sub/sub.h
index 2c54bfb56b..70adadcc70 100644
--- a/sub/sub.h
+++ b/sub/sub.h
@@ -182,7 +182,6 @@ extern char *sub_cp;
extern int sub_pos;
extern float text_font_scale_factor;
-extern int subtitle_autoscale;
extern char *font_name;
extern char *sub_font_name;