[MPlayer-cvslog] r22281 - in trunk/libass: ass.c ass_render.c

eugeni subversion at mplayerhq.hu
Mon Feb 19 21:10:55 CET 2007


Author: eugeni
Date: Mon Feb 19 21:10:55 2007
New Revision: 22281

Modified:
   trunk/libass/ass.c
   trunk/libass/ass_render.c

Log:
Both (-1) and 1 mean bold font in SSA/ASS styles.
The same for italics and some other fields.


Modified: trunk/libass/ass.c
==============================================================================
--- trunk/libass/ass.c	(original)
+++ trunk/libass/ass.c	Mon Feb 19 21:10:55 2007
@@ -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)

Modified: trunk/libass/ass_render.c
==============================================================================
--- trunk/libass/ass_render.c	(original)
+++ trunk/libass/ass_render.c	Mon Feb 19 21:10:55 2007
@@ -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.);



More information about the MPlayer-cvslog mailing list