Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
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.) –  Ulrike Fischer Nov 9 '11 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. –  Marco Daniel Nov 9 '11 at 9:58

1 Answer 1

up vote 10 down vote accepted

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.

share|improve this answer
    
Thanks for the explanation. –  Marco Daniel Nov 9 '11 at 10:31
2  
I think context contains code to improve speed. The font caches of contexte.g. seems to be stored in binary files (.tmc). –  Ulrike Fischer Nov 9 '11 at 10:50
    
@Patrick: Please have a look at my other question: tex.stackexchange.com/questions/34153/… –  Marco Daniel Nov 9 '11 at 12:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.