[luatex] using fea files in plain TeX

Dohyun Kim nomosnomos at gmail.com
Fri Jul 10 14:40:41 CEST 2009

2009/7/10 Khaled Hosny <khaledhosny at eglug.org>:
> On Fri, Jul 10, 2009 at 09:58:27PM +1000, Vafa Khalighi wrote:
>> How do you usually use feature files in luatex. I have followed the instruction
>> at wiki. but it seems I can not use it in Plain TeX. I have attached the files
>> and the error I get is:
>> This is LuaTeX, Version beta-0.40.3-2009060821 (Web2C 2009)
>> (test.tex <luatex-fonts-merged.lua> <luatex-fonts.lua loaded in 0.020 seconds>
>> ! LuaTeX error ...exmf/tex/luatex/luatex-fonts/luatex-fonts-merged.lua:1782: ba
>> d argument #1 to 'lower' (string expected, got nil).
>> <to be read again>
>>                    \body
>> l.11 ...calt;featurefile=palatino.fea at 14pt\body
>> ?

luatex-fonts-merged.lua has a few bugs.
The problem raised in this thread is one of them.
To avoid this bug, I am currently overriding Hans's code as follows:

local remapper = {
    otf = "opentype fonts",
    ttf = "truetype fonts",
    ttc = "truetype fonts",
    cid = "cid maps",		-- texlive2009
    fea = "font feature files",	-- texlive2009

function resolvers.find_file(name,kind)
    name = string.gsub(name,"\\","\/")
    if not kind then
	kind = string.match(name,"%.(%a%a%a)$")
    if kind then
	kind = string.lower(kind)
    kind = (kind and kind ~= "" and (remapper[kind] or kind)) or "tex"
    return kpse.find_file(name,kind)

kpathsea in texlive 2009 can properly deal with "cid" and "fea" files,
which texlive 2008 fails to find.

Dohyun Kim

More information about the luatex mailing list