[luatex] luaotfload no longer finding fonts in TEXMF

Evan Cooch evan.cooch at gmail.com
Tue Jul 2 21:06:00 CEST 2013

> You should never run luaotfload-tool with root privileges. In
> fact if there was a cross-platform way to check for the uid I
> would make it refuse to run as root. The font index is created in
> the $TEXMFCACHE or $TEXMFVAR of each user. You can find out where
> that is like so:
>      kpse.set_program_name "luatex"
>      local dirs = { "$TEXMFCACHE", "$TEXMFVAR" }
>      for i=1, #dirs do
>        print(dirs[i], kpse.expand_path (dirs[i]))
>      end
> Of the printed paths the first one that proves to be writable
> wins and is created if it does not yet exist. Since the paths are
> different for root, the index would be written at a location that
> is not writable (or even accessible) with ordinary privileges.

Problem is confused on system (OS) where a 'user' account and a 'root' 
account are de facto the same thing.  There are a number of applications 
(I refuse to say 'apps' as a bit of token personal Luddism on my part) 
where this pairtng of 'run as user' and 'run again as admin' are 
necessary. Some other applications, if you run something as admin, 
migrate things out to each user account, and so forth.  Life is arguably 
simpler is some respects to not install MikteX for 'any user' unless you 
really need to. I generally have installed it that way not out of 
necessity (on most of my machines, I'm the only user) but because tht is 
the default install option, and it hasn't - generally - made much 

>> Either way, seems to work. My original query about 'why we need to
>> do this in the first instance' stands.
> The alternative is sticking with ASCII-only paths.
> Anyways, as globbing appears to be unreliable on Windows systems
> I just replaced the calls to dir.glob () with generic directory
> walks. A nice side effect is that the dependency on l-dir.lua is
> unnecessary now, so the next version of luaotfload will ship
> without it.

Interesting -- will look for it in future.  In the meantime, might be 
worth a general recommendation to simply move font trees out of TEXMF 
and into OS. Sure save a lot of hassles, and confusion for newcomers to 
this issue.

More information about the luatex mailing list