mirror of
https://github.com/mpv-player/mpv
synced 2025-01-11 17:39:38 +00:00
Both (-1) and 1 mean bold font in SSA/ASS styles.
The same for italics and some other fields. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22281 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
11399e2ac8
commit
999e603eb7
@ -458,6 +458,9 @@ static int process_style(ass_track_t* track, char *str)
|
||||
}
|
||||
style->ScaleX /= 100.;
|
||||
style->ScaleY /= 100.;
|
||||
style->Bold = !!style->Bold;
|
||||
style->Italic = !!style->Italic;
|
||||
style->Underline = !!style->Underline;
|
||||
if (!style->Name)
|
||||
style->Name = strdup("Default");
|
||||
if (!style->FontName)
|
||||
|
@ -983,14 +983,14 @@ static char* parse_tag(char* p, double pwr) {
|
||||
if (pwr >= 1.)
|
||||
render_context.bold = b;
|
||||
} else
|
||||
render_context.bold = - render_context.style->Bold;
|
||||
render_context.bold = render_context.style->Bold;
|
||||
update_font();
|
||||
} else if (mystrcmp(&p, "i")) {
|
||||
int i;
|
||||
if (mystrtoi(&p, 10, &i))
|
||||
render_context.italic = i;
|
||||
else
|
||||
render_context.italic = - render_context.style->Italic;
|
||||
render_context.italic = render_context.style->Italic;
|
||||
update_font();
|
||||
} else if (mystrcmp(&p, "kf") || mystrcmp(&p, "K")) {
|
||||
int val = strtol(p, &p, 10);
|
||||
@ -1152,8 +1152,8 @@ static void reset_render_context(void)
|
||||
if (render_context.family)
|
||||
free(render_context.family);
|
||||
render_context.family = strdup(render_context.style->FontName);
|
||||
render_context.bold = - render_context.style->Bold;
|
||||
render_context.italic = - render_context.style->Italic;
|
||||
render_context.bold = render_context.style->Bold;
|
||||
render_context.italic = render_context.style->Italic;
|
||||
update_font();
|
||||
|
||||
change_border(-1.);
|
||||
|
Loading…
Reference in New Issue
Block a user