aboutsummaryrefslogtreecommitdiffhomepage
path: root/libass
diff options
context:
space:
mode:
authorGravatar eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-02-19 20:10:55 +0000
committerGravatar eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-02-19 20:10:55 +0000
commit999e603eb7517757684b07e5c0ea085377187edf (patch)
treed91f5b7458f48c1b7f98bcece6559b5a3fdaf2f6 /libass
parent11399e2ac8ea179cf468402b147a020254674ee4 (diff)
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
Diffstat (limited to 'libass')
-rw-r--r--libass/ass.c3
-rw-r--r--libass/ass_render.c8
2 files changed, 7 insertions, 4 deletions
diff --git a/libass/ass.c b/libass/ass.c
index f071a3b6bb..546e417972 100644
--- a/libass/ass.c
+++ b/libass/ass.c
@@ -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)
diff --git a/libass/ass_render.c b/libass/ass_render.c
index 078316bc0c..4c54cec2a4 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -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.);