mirror of
https://github.com/mpv-player/mpv
synced 2024-10-22 08:51:57 +02:00
options: allow selecting the libass shaper
I'm using the word "languages" instead of "scripts" in the manpage, but I think that's easier to understand with a smaller amount of descriptions.
This commit is contained in:
parent
1e4f08c50c
commit
72fbd846db
@ -140,6 +140,15 @@
|
||||
``--ass-line-spacing=<value>``
|
||||
Set line spacing value for SSA/ASS renderer.
|
||||
|
||||
``--ass-shaper=simple|complex``
|
||||
Set the text layout engine used by libass.
|
||||
|
||||
:simple: uses Fribidi only, fast, doesn't render some languages correctly
|
||||
:complex: uses HarfBuzz, slower, wider language support
|
||||
|
||||
``complex`` is the default. If libass hasn't been compiled against HarfBuzz,
|
||||
libass silently reverts to ``simple``.
|
||||
|
||||
``--ass-styles=<filename>``
|
||||
Load all SSA/ASS styles found in the specified file and use them for
|
||||
rendering text subtitles. The syntax of the file is exactly like the ``[V4
|
||||
|
@ -540,6 +540,8 @@ const m_option_t mp_opts[] = {
|
||||
OPT_STRING("ass-styles", ass_styles_file, 0),
|
||||
OPT_CHOICE("ass-hinting", ass_hinting, 0,
|
||||
({"none", 0}, {"light", 1}, {"normal", 2}, {"native", 3})),
|
||||
OPT_CHOICE("ass-shaper", ass_shaper, 0,
|
||||
({"simple", 0}, {"complex", 1})),
|
||||
OPT_CHOICE("ass-style-override", ass_style_override, 0,
|
||||
({"no", 0}, {"yes", 1})),
|
||||
OPT_FLAG("osd-bar", osd_bar_visible, 0),
|
||||
@ -829,6 +831,7 @@ const struct MPOpts mp_default_opts = {
|
||||
.ass_vsfilter_color_compat = 1,
|
||||
.ass_vsfilter_blur_compat = 1,
|
||||
.ass_style_override = 1,
|
||||
.ass_shaper = 1,
|
||||
.use_embedded_fonts = 1,
|
||||
.suboverlap_enabled = 0,
|
||||
#ifdef CONFIG_ENCA
|
||||
|
@ -202,6 +202,7 @@ typedef struct MPOpts {
|
||||
char *ass_styles_file;
|
||||
int ass_style_override;
|
||||
int ass_hinting;
|
||||
int ass_shaper;
|
||||
|
||||
int hwdec_api;
|
||||
char *hwdec_codecs;
|
||||
|
@ -138,6 +138,9 @@ void mp_ass_configure(ASS_Renderer *priv, struct MPOpts *opts,
|
||||
ass_set_use_margins(priv, set_use_margins);
|
||||
#if LIBASS_VERSION >= 0x01010000
|
||||
ass_set_line_position(priv, set_sub_pos);
|
||||
#endif
|
||||
#if LIBASS_VERSION >= 0x01000000
|
||||
ass_set_shaper(priv, opts->ass_shaper);
|
||||
#endif
|
||||
ass_set_font_scale(priv, set_font_scale);
|
||||
ass_set_hinting(priv, set_hinting);
|
||||
|
Loading…
Reference in New Issue
Block a user