Skip to content

Commit

Permalink
options: rename --sub-ass-hinting to --sub-hinting
Browse files Browse the repository at this point in the history
Because it also affects plain text subtitles.
  • Loading branch information
guidocella committed Nov 9, 2024
1 parent 2fb1020 commit b140348
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions DOCS/interface-changes/sub-ass-options.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
rename `--sub-ass-line-spacing` to `--sub-line-spacing`
rename `--sub-ass-shaper` to `--sub-shaper`
rename `--sub-ass-hinting` to `--sub-hinting`
2 changes: 1 addition & 1 deletion DOCS/man/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2506,7 +2506,7 @@ Subtitles

Using this option may lead to incorrect subtitle rendering.

``--sub-ass-hinting=<none|light|normal|native>``
``--sub-hinting=<none|light|normal|native>``
Set font hinting type. <type> can be:

:none: no hinting (default)
Expand Down
3 changes: 2 additions & 1 deletion options/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,9 @@ const struct m_sub_options mp_subtitle_sub_opts = {
.flags = UPDATE_SUB_HARD},
{"sub-ass-styles", OPT_STRING(ass_styles_file),
.flags = M_OPT_FILE | UPDATE_SUB_HARD},
{"sub-ass-hinting", OPT_CHOICE(ass_hinting,
{"sub-hinting", OPT_CHOICE(sub_hinting,
{"none", 0}, {"light", 1}, {"normal", 2}, {"native", 3})},
{"sub-ass-hinting", OPT_REPLACED("sub-hinting")},
{"sub-shaper", OPT_CHOICE(sub_shaper, {"simple", 0}, {"complex", 1})},
{"sub-ass-shaper", OPT_REPLACED("sub-shaper")},
{"sub-ass-prune-delay", OPT_DOUBLE(ass_prune_delay), M_RANGE(-1.0, DBL_MAX)},
Expand Down
2 changes: 1 addition & 1 deletion options/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ struct mp_subtitle_opts {
bool use_embedded_fonts;
char **ass_style_override_list;
char *ass_styles_file;
int ass_hinting;
int sub_hinting;
int sub_shaper;
double ass_prune_delay;
bool ass_justify;
Expand Down
2 changes: 1 addition & 1 deletion sub/sd_ass.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ static void configure_ass(struct sd *sd, struct mp_osd_res *dim,
if (converted || shared_opts->ass_style_override[sd->order]) {
set_sub_pos = 100.0f - shared_opts->sub_pos[sd->order];
set_line_spacing = opts->sub_line_spacing;
set_hinting = opts->ass_hinting;
set_hinting = opts->sub_hinting;
}
if (total_override || shared_opts->ass_style_override[sd->order] == ASS_STYLE_OVERRIDE_SCALE) {
set_font_scale = opts->sub_scale;
Expand Down

0 comments on commit b140348

Please sign in to comment.