Mercurial > mplayer.hg
changeset 22263:1bf17db53cc3
Both (-1) and 1 mean bold font in SSA/ASS styles.
The same for italics and some other fields.
author | eugeni |
---|---|
date | Mon, 19 Feb 2007 20:10:55 +0000 |
parents | 184e92166a6a |
children | db58524617f5 |
files | libass/ass.c libass/ass_render.c |
diffstat | 2 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libass/ass.c Mon Feb 19 19:01:45 2007 +0000 +++ b/libass/ass.c Mon Feb 19 20:10:55 2007 +0000 @@ -458,6 +458,9 @@ } 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)
--- a/libass/ass_render.c Mon Feb 19 19:01:45 2007 +0000 +++ b/libass/ass_render.c Mon Feb 19 20:10:55 2007 +0000 @@ -983,14 +983,14 @@ 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 @@ 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.);