[MPlayer-users] Mplayer + fontconfig + M$Win

John Brown johnbrown105 at hotmail.com
Wed Nov 1 04:03:59 CET 2006


John Brown wrote:
>
>
>>Victor Farias wrote:
>>
>>John Brown wrote:
>>
>>>I will try it as soon as I get home. Do you know why fontconfig, etc. 
>>>have to be shared libraries?
>>
>>It was the only way I could find to compile MPlayer with fontconfig 
>>support under Windows.
>>
>Actually, I succeeded in compiling fontconfig as a static library. It
>seemd that it was not working because:
>
>1) Although MPlayer's configure detected fontconfig,
>#undef HAVE_FONTCONFIG was in config.h. I changed it to
>#define HAVE_FONTCONFIG and I had to manually set
>FONTCONFIG_LIB = -lfontconfig -lexpat -lfreetype -lz
>
>2) I used the wrong command line. I left out the -fontconfig.
>
>So now everything works, except that there is a long delay
>each time that I run MPlayer. The link that you posted says
>something about this, so I will look into it when I get home.

If anyone is interested, this was because of a problem in fc-cache.
access(dir, W_OK) returned that it did not have write access
to the Windows font directory, which was not true, so it did not
attempt to create the cache.

I worked around this first by copying my fonts folder to ./.fonts,
where fc-cache created the cache, and then copying the cache file
to c:\windows\fonts.

I then fixed fc-list something like this:

int w32access(char *path, int mode){
   if (mode != W_OK)
      return access(path, mode);
   else{
      try to create file in path
      if you can, then return 0;
      else return suitable error
   }
}

Now my MPlayer built with static fontconfig is working perfectly,
so it is possible.
>
>>I almost forgot about this... You need to apply the attached patch to 
>>avoid an error while compiling fontconfig.
>>
>Some versions of freetype that I tried had
>#include FT_INTERNAL_OBJECTS_H.
>Version 2.1.8 does not, so no patch was necessary.

Sorry, I did not actually look at your patch, which solves a different 
problem.
>

_________________________________________________________________
Stay in touch with old friends and meet new ones with Windows Live Spaces 
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us




More information about the MPlayer-users mailing list