mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
sub: make font provider user-selectable
libass had an API to configure this since 2013. mpv always used ASS_FONTPROVIDER_AUTODETECT, because usually there's little reason to use anything else. The intention of the now added option is to allow users to disable use of system fonts. I didn't consider it worth the trouble to add the coretext and directwrite enum items from ASS_DefaultFontProvider. The "auto" choice will have the same effect if they're available. Also, the part of the code which defines the option does not necessarily have libass available (it's still optional!), so defining all enum items as choices is icky. I still added fontconfig, since that may be nice to emulate a nostalgic 2010 feeling of mpv freezing on fontconfig. The option for OSD is even less useful. (But you get it for free, and why pass up a chance to add yet another useless option?) This is not quite what was requested in #6947, but as close as it gets.
This commit is contained in:
@@ -64,6 +64,8 @@ static const m_option_t style_opts[] = {
|
||||
OPT_FLAG("italic", italic, 0),
|
||||
OPT_CHOICE("justify", justify, 0,
|
||||
({"auto", 0}, {"left", 1}, {"center", 2}, {"right", 3})),
|
||||
OPT_CHOICE("font-provider", font_provider, 0,
|
||||
({"auto", 0}, {"none", 1}, {"fontconfig", 2})),
|
||||
{0}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user