[lltx] Can luatex auto-run mkluatexfontdb ?

Khaled Hosny khaledhosny at eglug.org
Wed May 19 21:43:52 CEST 2010


On Wed, May 19, 2010 at 11:06:39AM +0300, Elie Roux wrote:
> Manuel Pégourié-Gonnard a écrit :
> >I agree with Khaled. If al we need is the list of directories,
> >then reading the
> >configuration file sounds like a good option.
> 
> Ok... let's go then... well... this solves the problem in linux
> where the file is at a standard place (/etc/fonts/fonts.conf)... at
> least I hope all distributions put it here.

Check FC documentation about standard location of configuration file, I
recall it was documented there.

>                                              Do anyone have a
> different file? That's part of the problem that may appear later: if
> a distribution changes this file, its location, its format, etc. we
> will have to have a huge amount of patches...

Distributions can't change the format, unless they change FC
drastically, which I don't see any sane distribution doing. FC
configuration syntax is well documented and is unlikely to change since
there are many third party tools that read/write it, we are not alone.

>                                               where the call to
> fc-list is standard thanks to the path variable which is supposed to
> be set accordingly. There is absolutely no guaranty that it will
> stay in the same format across the versions, whereas we can expect
> some sort of backward compatibility in fc-list.

It is actually the other way around, read my comment above. Note that
fc-list output is supposed to be human, not machine readable, and no
syntax is documented at all, I just guessed from the output on my
machine. I don't know from where you get the idea it would remain
backward compatible.

> Anyway, how should we proceed under windows? Should we scan only
> C:\WINNT\Fonts?

No, it is %windir%\fonts, %windir% as an env variable (dunno how env
variables are handled under windows, though).

> >While it is generally a bad idea to try parsing XML using regexes, I think it
> >would be possible to retrieve the information in this particular case using
> >regexes rather than a full-fledge XML parser.
> 
> The fonts.conf I have is extremely simple to parse... could everyone
> send me his fonts.conf so that I can see if there are some
> differences?

Most FC configuration files (almost everything under /etc/fonts) is
shipped with the library itself, distributions are likely to add files
on top of it, but, to be safe, you should be checking file syntax in the
documentation, you don't need to reverse engineer it.
http://fontconfig.org/fontconfig-user.html

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer


More information about the lualatex-dev mailing list