[luatex] \font primitive does not read otf file

Petr Olsak petr at olsak.net
Sun Dec 2 23:17:20 CET 2012

>>   luatex -ini luatex.ini
> luatex-plain is another format. If you are working with texlive
> or context you can find it in /tex/generic/context/luatex/.
> Philipp

Thanks. I did know about it. This demonstrates that I am novice in LuaTeX.

Let me summarise the lucaodes from both ways of solution:

*1* From luatex-plain (luatex-fonts.tex is read) with the result:

\directlua {dofile(kpse.find_file("luatex-fonts.lua","tex"))}

This solution does not interpret fontfeatures. Indeed, \fontname\font
expands to the file name without features even if the features was 
used in \font parameters. The conversion --- to \emdash etc. doesn't 
work. So, this solution is unusable.

*2* Extracted from luaotfload.sty (and more 18 style files):

\directlua{luatexbase = luatexbase or {}
                luatexbase.luatexversion = \the\luatexversion\space
                luatexbase.luatexrevision = \luatexrevision\space
             oriwrite = texio.write_nl % I don't need to see unusual info
             function texio.write_nl(...) end
             texio.write_nl = oriwrite % return to original meaning

This works. But I don't know if I can store this solution to my macros 
with sureness that it will work in future. I am not sure because the 
solution depend on plenty of luacodes. But I hope... This is the 
``interface'' between your an my work which I am finding.

Petr Olsak

More information about the luatex mailing list