0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00
mpv/sub
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
..
ass_mp.c osd: make the OSD and sub font more customizable 2012-11-20 18:00:15 +01:00
ass_mp.h osd: make the OSD and sub font more customizable 2012-11-20 18:00:15 +01:00
dec_sub.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
dec_sub.h VO, sub: refactor 2012-10-24 21:56:34 +02:00
draw_bmp.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
draw_bmp.h screenshot, draw_bmp: use colorspace passed with mp_image 2012-11-01 02:07:45 +01:00
find_sub.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
find_subfiles.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
find_subfiles.h subs: options: add -sub-paths 2011-04-20 04:22:52 +03:00
img_convert.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
img_convert.h Remove things related to old OSD 2012-10-24 21:56:33 +02:00
osd_dummy.c sub: allow rendering OSD in ASS image format directly, simplify 2012-10-16 07:26:30 +02:00
osd_font.pfb osd: osd_font.h -> osd_font.pfb 2012-07-28 23:36:08 +02:00
osd_libass.c osd: make the OSD and sub font more customizable 2012-11-20 18:00:15 +01:00
sd_ass.c sd_ass: fix ASS subtitles coming from demux_lavf 2012-11-16 22:54:22 +01:00
sd_lavc.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
sd.h VO, sub: refactor 2012-10-24 21:56:34 +02:00
spudec.c Fix potential bugs and issues, general cleanups 2012-11-20 18:00:14 +01:00
spudec.h options: remove --ffactor switch 2012-10-24 21:56:35 +02:00
sub.c osd: make the OSD and sub font more customizable 2012-11-20 18:00:15 +01:00
sub.h osd: make the OSD and sub font more customizable 2012-11-20 18:00:15 +01:00
subassconvert.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
subassconvert.h
subreader.c Fix potential bugs and issues, general cleanups 2012-11-20 18:00:14 +01:00
subreader.h subreader: replace sub_free() by talloc destructor 2012-11-16 21:21:15 +01:00
vobsub.c Fix potential bugs and issues, general cleanups 2012-11-20 18:00:14 +01:00
vobsub.h Remove dead code 2012-08-01 17:07:35 +02:00