diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index c1e5d23e09..72a67c85b4 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -2625,6 +2625,9 @@ OSD ``--osd-bold=``, ``--sub-text-bold=`` Format text on bold. +``--osd-italic=``, ``--sub-text-italic=`` + Format text on italic. + ``--osd-border-color=``, ``--sub-text-border-color=`` See ``--osd-color``. Color used for the OSD/sub font border. diff --git a/sub/ass_mp.c b/sub/ass_mp.c index 93a797e036..2f9b39740f 100644 --- a/sub/ass_mp.c +++ b/sub/ass_mp.c @@ -77,6 +77,7 @@ void mp_ass_set_style(ASS_Style *style, double res_y, style->Alignment = 1 + (opts->align_x + 1) + (opts->align_y + 2) % 3 * 4; style->Blur = opts->blur; style->Bold = opts->bold; + style->Italic = opts->italic; } void mp_ass_configure_fonts(ASS_Renderer *priv, struct osd_style_opts *opts, diff --git a/sub/osd.c b/sub/osd.c index bbc6d9a1e1..4e269ce5aa 100644 --- a/sub/osd.c +++ b/sub/osd.c @@ -61,6 +61,7 @@ static const m_option_t style_opts[] = { ({"top", -1}, {"center", 0}, {"bottom", +1})), OPT_FLOATRANGE("blur", blur, 0, 0, 20), OPT_FLAG("bold", bold, 0), + OPT_FLAG("italic", italic, 0), {0} }; diff --git a/sub/osd.h b/sub/osd.h index 0c9dbc3e90..550b31e5a7 100644 --- a/sub/osd.h +++ b/sub/osd.h @@ -123,6 +123,7 @@ struct osd_style_opts { int align_y; float blur; int bold; + int italic; }; extern const struct m_sub_options osd_style_conf;