When trying to use the Greek symbols in the font Fira Sans with unicode-math, I noticed that running lualatex on my document uses up enormous amounts of RAM. I have distilled my problem to a minimal working example:


% each of the following \setmathfont lines adds around 1GB of used RAM




Running this with lualatex uses around 4GB of memory (and takes a quite while to complete). For longer documents, this grows even more, eventually filling all the RAM I have available.

I have noticed that when running this, execution seems to take a lot of time during the following part of the output (during which memory usage increases continuously):

(load luc: ~/.texlive2018/texmf-var/luatex-cache/generic/fonts/otl/lmroman7-regular.luc)
(load luc: ~/.texlive2018/texmf-var/luatex-cache/generic/fonts/otl/lmroman5-regular.luc)

xelatex handles the same example in a fraction of a second and without unexpected use of memory (maybe not surprising, since the lines above are related to luatex’s font cache).

What is going on here and can I do anything about it? This doesn’t seem to happen with fonts other than Fira Sans.

I’m running TeX Live from the Ubuntu 18.10 repositories (“This is LuaTeX, Version 1.07.0 (TeX Live 2019/dev/Debian)”).

  • 2
    It works okay, if I use \setmathfont{FiraMath} instead of text fonts. Mar 26 '19 at 13:05
  • @UlrikeFischer Well, yes, but Fira Math is very young. The question is more about an explanation for the behavior (maybe it’s a bug that’s worth fixing?), not workarounds.
    – Socob
    Mar 26 '19 at 17:03
  • I don't know what happens or if xfrac is actually meant to be used together with unicode math. I suggest that you report it at the unicode github github.com/wspr/unicode-math/issues. Will will perhaps know something about it. Mar 26 '19 at 22:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.