[luatex] \font primitive does not read otf file

Petr Olsak petr at olsak.net
Sun Dec 2 12:11:40 CET 2012

> Hello,
> I am starting with LuaTeX and I have problem to find the relevant
> documentation about \font primitive. There is only one document
>     http://www.luatex.org/talks/print-plain-tug-2009.pdf
> page 7. It seems that the \font primitive works like in XeTeX.

No, \font works more or less like in pdftex. But there is a
"callback" where you can insert lua-code (a "font-loader") to expand
its capabilities.

One existing font loader is luaotfload so try this:

\input luaotfload.sty
\aa  text

Ulrike Fischer

Thanks for your answer.

I am developing plainTeX macros. The solution which loads some sty file 
and starts loading 18 another .sty files (!!) to solve one SIMPLE problem 
is not compatible with plainTeX philosophy. If \tracingall is set then 
more than 8000 lines of log is produced.

So, I have perfromed some reverse engeneering to extract the lua code and 
there is a result:


\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

\aa  text



Now, the \tracingall produces only 255 lines and the core of the problem 
is shown. Why this is not documented?

Petr Olsak

More information about the luatex mailing list