[MPlayer-dev-eng] [PATCH] Fix bug with option '-fontconfig' and ass subtitles
Reimar.Doeffinger at gmx.de
Fri Jan 24 17:07:39 CET 2014
On Fri, Jan 24, 2014 at 04:16:16PM +0100, Ingo Brückl wrote:
> Reimar Döffinger wrote on Fri, 24 Jan 2014 14:24:17 +0100:
> > "Ingo Brückl" <ib at wupperonline.de> wrote:
> >>I wrote on Thu, 23 Jan 2014 21:47:24 +0100:
> >>> The condition for using fontconfig is font_fontconfig >= 0 throughout
> >>> all source files.
> >>Actually it's font_fontconfig > 0 with reason throughout all other
> >>source files.
> >>It's just ass_mp.c incorrectly using font_fontconfig >= 0, so there
> >>have to be more fixes than just the one suggested yesterday.
> > I suspect it is not incorrect, but that the variable was supposed to be
> > tristate: default, force enable, force disable.
> > Probably somewhere the whole mapping got a bit wrong, but maybe
> > -nofontconfig should use -1?
> Currently it seems to have two states only, -fontconfig (the default) is 1
> and -nofontconfig (already) is -1.
> So, at the moment it actually doesn't matter whether using fontconfig is
> tested font_fontconfig >= 0 or font_fontconfig > 0, but I think it has to be
> consistent throughout all source files, and it's currently a mix of both.
> So, it's up to you to decide: greater/equal or greater?
I think you misunderstand then: The difference is on purpose.
0 is the documented behaviour (use only for libass).
If we want to remove this feature then only 0/1 should be used and
a simple if (fontconfig), no > 0 or >= 0.
> The argument to ass_set_fonts() is a bug in any case though and must be
A admit I did not look into the details.
More information about the MPlayer-dev-eng