I have some opentype fonts (otf) which I use with fontspec. Everything works fine.

During the compilation LuaLaTeX load the otf-files in a temporary file.

For example:

(load: /home/marco/.texlive2011/texmf-var/luatex-cache/generic/fonts/otf/temp-FONTNAME.lua)

Is it possible to install the font via LuaLaTeX or fontspec that the compilation will be reduced?

I know the script otfins.py but maybe there is an easier way.

  • 1
    I don't understand the question. The temp-FONTNAME-file will be created the first time you use the font and then normally lualatex should reuse it if you don't delete it between compilations. (The file contains informations similar to the one in a tfm. You can open it in a text editor to inspect it.) Nov 9, 2011 at 7:33
  • @UlrikeFischer: Thanks for the reply. I have the feeling that without installing the otf-file as normal the compilation time is very high. In my example I tested minion pro. Nov 9, 2011 at 9:58

1 Answer 1


Short answer: no you can't. Long answer: fontspec uses luaotfload to load fonts. And luaotfload (which is based on ConTeXt's fontloader) needs a lot of information when you are in node-mode. This information is stored in big Lua tables that get loaded (created) when processing the document. And processing these tables take time.

That said: it is possible to create your own font loader in LuaTeX which speeds up things. When you restrict yourself to the TeX way of handling fonts (no contextual ligatures AFAIK, no language dependent font usage), the required table is much smaller and therefore when using a cache, loading a font should only take a fraction of the time it takes with luaotfload.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .