[MPlayer-users] Re: zlib and fontconfig

John Brown johnbrown105 at hotmail.com
Sun Nov 5 13:39:25 CET 2006


Nicholas Schell wrote:
>Foolish me :)
>
>On 11/4/06, John Brown <johnbrown105 at hotmail.com> wrote:
>>Nicholas Schell wrote:
<snip>
>> >I can't send out
>> >a build which requires fonts.conf to be located at
>> >"C:/msys/1.0/mingw/etc/fonts/fonts.conf" or any other absolute path,
>> >it just doesn't make sense.
>>
<snip>
>>As I said, when I specify a relative confdir, then confdir has to exist 
>>*in
>>the directory that I am in*.
<snip>
>>
>>What you probably want is behaviour like MPlayer's --codecsdir. If
>>--codecsdir=codecs, MPlayer looks for codecs relative to MPlayer.exe.
<snip>
>>Did you check to see whether fontconfig recognizes any environment
>>variables? I had a quick look at the docs, but I did not find anything.
>
It seems that there is a variable FONTCONFIG_FILE, but it doesn't quite work 
on Windows, at least in version 2.2.3. If you look in run-test.sh, you will 
see that they set the variable there.

I configured fontconfig and did not specify confdir. fc-list worked. I then 
set FONTCONFIG_FILE to foo, and fc-list could not load the default config 
file. I then set FONTCONFIG_FILE to c:\mingw\etc\fonts\fonts.conf, and it 
still couldn't find the config file, which was not expected. I deleted the 
FONTCONFIG_FILE variable, and it started working again.

There is also FONTCONFIG_PATH, which I believe is the list of directories 
where it should look for fonts, but I am not sure.

I eventually determined that you have to enter the conf file name  without 
the drive letter, i.e. \mingw\etc\fonts\fonts.conf. It is probably treating 
the ':' as a path separator.
<snip>
>  You
>described exactly the behavior I'm looking for though, which
>fontconfig does seem to show when compiled as a shared lib. I suppose
>that is because it is using a relative path in relation to the DLL
>itself not mplayer.exe, so it all works out in the end.

That is exactly what it does in DllMain.
<snip>

>If I knew at all how to code/understand any of that I would do
>it, but I don't...yet.

If it has not been fixed, then look at src/fccfg.c at FcConfigFilename and 
optionally FcConfigGetPath. I think the easiest thing for *you* would be to 
fix the part where it reads %FONTCONFIG_FILE%, then tell your users to set 
FONTCONFIG_FILE. Of course, it is possible that your users don't mind the 
additional step, or would even prefer to not to keep confdir in ./mplayer.

<snip>

_________________________________________________________________
Get FREE company branded e-mail accounts and business Web site from 
Microsoft Office Live 
http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/




More information about the MPlayer-users mailing list