[lltx] XeTeX vs LuaTeX font names

Khaled Hosny khaledhosny at eglug.org
Mon Jul 12 18:59:49 CEST 2010

On Tue, Jul 13, 2010 at 01:01:19AM +0930, Will Robertson wrote:
> Hi,
> When installed in Mac OS X, the Latin Modern fonts are selected individually in XeTeX with names like 
>     "Latin Modern Roman 5 Regular"
> With luaotfload, however, things are different:
>     ["fullname"]="LM Roman 5 Regular"
> (And this name doesn't work for XeTeX.)
> This leads to incompatible font names depending if the document is for XeTeX or LuaTeX; is there any way around this inconsistency?

I had hard time supporting Latin Modern naming scheme, I thought I've
already fixed it. Now checking the font with fontforge I found that it
has different name for Mac and Windows (TrueType spec provide different
enteries in the name table for each of the two platforms), however
FontForge considers this a bug in the font and discards the Mac entry
returning only the Windows one, which is what luatex's fontloader does
too. So, there is nothing to do at luaotfload currently, until some one
patches the fontloader so that it returns both platforms names.

OK, looking again I found that they set the preferred family to "Latin
Modern Roman" and preferred style too "5 Regular", overriding the
fullname and subfamily entries, so "Latin Modern Roman 5 Regular"
should work, and indeed it was working few releases ago, but the optical
sizes feature was broken (as we would end up with a different entry for
each size in the family and thus no optical size selection would work),
so I followed the spec, AFAIU, and used the style name that is defined
in the size feature which is "Regular" without the size number.

The Latin Modern names are really a big mess, for example fontconfig
fails to handle it properly. It would have made my life easier if they
did it in a saner way.

AFAIC, I'm not doing any further work to support Latin Modern names,
anyone is free to submit patches, though.


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

More information about the lualatex-dev mailing list