1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 09:02:38 +00:00
mpv/core
wm4 80270218cb 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
2012-11-20 18:00:15 +01:00
..
input command: add sub_reload and sub_remove commands 2012-11-16 21:21:15 +01:00
timeline clang: fix all warnings except deprecations 2012-11-13 22:19:18 +01:00
asxparser.c
asxparser.h
av_log.c
av_log.h
av_opts.c
av_opts.h
bstr.c
bstr.h
cfg-mplayer.h osd: make the OSD and sub font more customizable 2012-11-20 18:00:15 +01:00
codec-cfg.c
codec-cfg.h
command.c osd: make the OSD and sub font more customizable 2012-11-20 18:00:15 +01:00
command.h
cpudetect.c
cpudetect.h
defaultopts.c osd: make the OSD and sub font more customizable 2012-11-20 18:00:15 +01:00
defaultopts.h
encode_lavc.c
encode_lavc.h
encode.h
m_config.c
m_config.h
m_option.c m_option: add color option type 2012-11-20 18:00:15 +01:00
m_option.h m_option: add color option type 2012-11-20 18:00:15 +01:00
m_property.c
m_property.h
m_struct.c
m_struct.h
mp_common.c
mp_common.h mp_common.h: split parts into mp_talloc.h and compiler.h 2012-11-12 20:08:57 +01:00
mp_core.h core: add --keep-open, which doesn't close the file on EOF 2012-11-16 21:21:15 +01:00
mp_fifo.c
mp_fifo.h
mp_msg.c build: remove doc/locale language auto-detection, simplify 2012-11-14 11:26:43 +01:00
mp_msg.h
mp_osd.h
mp_talloc.h mp_common.h: split parts into mp_talloc.h and compiler.h 2012-11-12 20:08:57 +01:00
mpc_info.h
mplayer.c osd: make the OSD and sub font more customizable 2012-11-20 18:00:15 +01:00
mplayer.h
options.h osd: make the OSD and sub font more customizable 2012-11-20 18:00:15 +01:00
parser-cfg.c Fix potential bugs and issues, general cleanups 2012-11-20 18:00:14 +01:00
parser-cfg.h
parser-mpcmd.c
parser-mpcmd.h
path.c
path.h
playlist_parser.c options: rename -ss and -endpos, allow relative times 2012-11-16 21:21:15 +01:00
playlist_parser.h
playlist.c
playlist.h
quvi.c
screenshot.c
screenshot.h
subopt-helper.c
subopt-helper.h
version.c