[MPlayer-dev-eng] [ass] fix font aspect for anamorphic video

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Feb 9 20:03:47 CET 2010


On Tue, Feb 09, 2010 at 07:39:22PM +0100, Reimar Döffinger wrote:
> On Tue, Feb 09, 2010 at 06:36:04PM +0100, Grigori Goronzy wrote:
> > Nonetheless I tried to reproduce this with slave mode, but couldn't see
> > any problems.
> 
> Try this sequence (mplayer with -ass and -vo gl)
> sub_load fribidi_hebrew_subs.srt
> set_property sub_scale 7
> sub_load fribidi_hebrew_subs.srt
> set_property sub_scale 3
> 
> When you switch between subtitles you'll see that the second subtitle is
> about 3 times as large as the first one.
> But it may not be really related to libass, so don't feel obligated to
> investigate, just if you're interested.

Note that this particular problem seems to be fixed by not applying both the
ass font scale and the normal subtitle text scale at the same time,
I think that's the right thing to do but don't know for sure:
Index: libass/ass_mp.c
===================================================================
--- libass/ass_mp.c	(revision 30526)
+++ libass/ass_mp.c	(working copy)
@@ -93,7 +93,7 @@
 		style->FontName = (font_fontconfig >= 0 && sub_font_name) ? strdup(sub_font_name) : (font_fontconfig >= 0 && font_name) ? strdup(font_name) : strdup("Sans");
 		style->treat_fontname_as_pattern = 1;
 
-		fs = track->PlayResY * text_font_scale_factor / 100.;
+		fs = track->PlayResY / 100.;
 		// approximate autoscale coefficients
 		if (subtitle_autoscale == 2)
 			fs *= 1.3;



More information about the MPlayer-dev-eng mailing list