summaryrefslogtreecommitdiffstats
path: root/core/options.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-11-17 20:56:45 +0100
committerwm4 <wm4@nowhere>2012-11-20 18:00:15 +0100
commit80270218cb9bda57afbb739fa22f7eb2f3a556ff (patch)
tree9e38c23238ef01e7f8d71e8adf99674e3044148e /core/options.h
parentd23b620a89e88b0ec0d6a66c7f05c2e461579647 (diff)
downloadmpv-80270218cb9bda57afbb739fa22f7eb2f3a556ff.tar.bz2
mpv-80270218cb9bda57afbb739fa22f7eb2f3a556ff.tar.xz
osd: make the OSD and sub font more customizable
Make more aspects of the OSD font customizable. This also affects the font used for unstyled subtitles (such as SRT), or when using the --no-ass option. This adds back some customizability that was lost with commit 74e7a1 (osd: use libass for OSD rendering). Removed options: --ass-border-color --ass-color --font --subfont --subfont-text-scale Added options: --osd-color --osd-border --osd-back-color --osd-shadow-color --osd-font --osd-font-size --osd-border-size --osd-margin-x --osd-margin-y --osd-shadow-offset --osd-spacing --sub-scale The font size is now specified in pixels as it would be rendered on a window with a height of 720 pixels. OSD and subtitles are always scaled with the window height, so specifying or expecting an absolute font size doesn't make sense. Such scaled pixel units are used to specify font border etc. as well. (Note: the font size is directly passed to libass. How the fonts are actually rasterized is outside of our control, but in theory ASS font sizes map to "script" pixels and then are scaled to screen size.) The default settings should be about the same, with slight difference due to rounding to the new scales. The OSD and subtitle fonts are not separately configurable. It has limited use and would double the number of newly added options, which would be more confusing than helpful. It could be easily added later, should the need arise. Other small details that change: - ASS_Style.Encoding is not set to -1 for subs anymore (assuming subs use VSFilter direction in -no-ass mode too) - use a different WrapStyle for OSD - ASS forced styles are not applied to OSD
Diffstat (limited to 'core/options.h')
-rw-r--r--core/options.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/options.h b/core/options.h
index 50f5d10bbf..3f916310b6 100644
--- a/core/options.h
+++ b/core/options.h
@@ -110,8 +110,9 @@ typedef struct MPOpts {
char **sub_name;
char **sub_paths;
int sub_auto;
+ struct osd_style_opts *osd_style;
+ float sub_scale;
int ass_enabled;
- float ass_font_scale;
float ass_line_spacing;
int ass_top_margin;
int ass_bottom_margin;
@@ -119,8 +120,6 @@ typedef struct MPOpts {
int ass_vsfilter_aspect_compat;
int use_embedded_fonts;
char **ass_force_style_list;
- char *ass_color;
- char *ass_border_color;
char *ass_styles_file;
int ass_style_override;
int ass_hinting;