[lltx] Font names database

Khaled Hosny khaledhosny at eglug.org
Wed Jan 13 18:42:44 CET 2010


On Wed, Jan 13, 2010 at 02:11:27PM +0200, Élie Roux wrote:
> I think we should make a first pass generating a table like
> 
> fonts.list = {
>   {
>     fullname = "LMRoman10-Regular",
>     variant = "regular" -- we should normalize the value here
>     size = 10             -- here too
>     familyname = "Latin Modern Roman" -- the thing that will be
> searched first, for compatibility with fc and thus XeTeX
>     family = "LM Roman 10"
>     path = "/path/to/the/file"
> }
> 
> and then making a second pass that generates the table that will be
> written in the file:
> 
> fonts = {
>   familyname = "Latin Modern Roman",
>   alias = "LM Roman 10"
>     {
>       size = 10,  -- can be 0 for any
>         {
>           variant = "regular",
>           fullname = "LMRoman10-Regular"
>           path = "/path/to/the/file"
>         }
>         {
>           variant = "slanted",
>           fullname = "LMRoman10-Slanted"
>           path = "/path/to/the/file"
>         }
>      }
>      {
>        size = 12,
>        {
>           ...
>        }
>      ....
> }
> 
> With this, a single font would fit in a family with this font only,
> and we can do a very quick search on a requested name (only on the
> fields familyname and alias, and then go in the subtree to be more
> precise, etc.). Wdyt?

That is an interesting idea, I have a more or less similar idea, but I
need to think more about it though.

> If you can't use fontconfig on your system I can do this part.
> fontconfig exists under cygwin if it helps, though it would need a
> change from cygwin paths to Windows paths. (cygwin is always a mess
> for programmers...)

I've considered using fontconfig (actually my first version were using
fc-list to list all system font files), but I disregarded it later as we
can't guarantee fontconfig (or fontconfig tools) are present on all
systems, also fontconfig tries to do smart things that wouldn't fit our
needs and we better off parsing font files ourselves.

(BTW, I usually use a recent GNU/Linux distro and never use Windows as a
production system, so I might actually need Windows help more than any
thing else.)

Regards,
 Khaled


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



More information about the lualatex-dev mailing list