[tex-live] script for LuaTeX font database updating
t34www at googlemail.com
Thu Feb 25 16:06:07 CET 2010
On 25 February 2010 11:40, Élie Roux <elie.roux at telecom-bretagne.eu> wrote:
> in the recent development of luaotfload
> (http://github.com/mpg/luaotfload), we came up with a script,
> that build a font database by parsing the output of fc-list (or
> parsing the directories of OSFONTDIR) and exploring the directories in
> OPENTYPEFONTS (both in texmf.cnf), and writing a file otfl-fonts.lua
> in TEXMFVAR/tex. This file is used in order to be able to call a font
> by its name, like XeTeX does.
> I'm thinking now about making writing a wrapper for it look more like
> another TeXLive script, the thing is I'm not really aware of all the
> techniques TeX Live has to use in order to execute scripts on all
> platforms, and thus I don't really know how to build it... can someone
> explain me how to build such a script (restrictions on languages,
> modules to use, etc.)?
On Windows only Perl and Lua are available out of the box. Our tlperl
comes with a bunch of standard modules, Lua is rather bare-bones but
it has direct access to kpathsea library. In both cases language
primitives should be sufficient for simple parsing.
> Also, currently the script writes in the user's TEXMFVAR, it is a good
> idea to make a -sys version of the wrapper that would write in the
> system's TEXMFVAR, or is a --sys switch better?
Single common script is better. For Unix acting on argv is standard
and allows the -sys version to be a symlink. For Windows I need --sys
switch for our universal wrapper, because I can't alter argv for
scripts (well, for Lua script I could, but switch will be less hackish
> Does it seem reasonable to call fc-cache at the beginning of the
Can't answer this.
> script? Is the name updatefontdb(-sys) OK for it (knowing that it's
No strong opinion on this but I would rather go for a more LuaTeX-specific name.
More information about the tex-live