4

I am using lualatex just because I can use current common font types. My project has its oddities, so it takes 5 lualatex runs for a complete build. I noticed a lot of the build time is for rebuilding its font db. I always get the same message

luaotfload | db : Reload initiated (formats: otf,ttf,ttc,dfont); reason: "Font lmromancaps10-regular.otf not found.".

This is not a special font however, but lives with all other LM fonts in

/usr/share/texmf/fonts/opentype/public/lm

Going through my document, I noticed before using this font, there are two lines of output using different fonts, which apparently aren't missing. So apparently there is a db available. I don't understand at all why the db is reloaded/rebuilt at each lualatex run. Is that normal? Wouldn't it be more sensible to reuse a db?

I would really like to speed up my lualatex runs, because they take ridiculously longer than pdflatex runs. Building my entire project using pdflatex takes about as long as a single lualatex run ... at least it used to; I accidentally broke compatibility with quoting styles, I think.

MWE:

\documentclass{standalone}

\usepackage{fontspec}
\usepackage[latin1]{luainputenc}

\setmainfont[%
          SmallCapsFont = lmromancaps10-regular.otf,
    ]{lmroman12}
\begin{document}
Will never get here
\end{document}
2
  • Please provide an MWE that generates the problem behavior you're looking to fix. Please also state which version of TeXLive you use.
    – Mico
    Oct 4, 2014 at 8:20
  • Inspect using a command tool like:luaotfload-tool --find="LMRomancaps10-Regular" --inspect --fuzzy. More likely you are not capitalizing the name properly. Oct 4, 2014 at 9:05

1 Answer 1

4

The problem was, that I specified the font by filename, like this:

 \setmainfont[%
      UprightFont = *-regular,
      BoldFont    = *-bold,
      ItalicFont  = *-italic,
      BoldItalicFont  = lmroman10-bolditalic.otf,
      SmallCapsFont = lmromancaps10-regular.otf,
      SmallCapsFeatures = {Scale=MatchUppercase},
      SlantedFont = lmromanslant12-regular.otf,
      BoldSlantedFont = lmromanslant10-bold.otf,
      Renderer=Basic
 ]{lmroman12}

This is what triggers the db reload. If I include the fonts by name, like this:

 \setmainfont[%
      UprightFont = *-regular,
      BoldFont    = *-bold,
      ItalicFont  = *-italic,
      BoldItalicFont  = lmroman10-bolditalic,
      SmallCapsFont = lmromancaps10-regular,
      SmallCapsFeatures = {Scale=MatchUppercase},
      SlantedFont = lmromanslant12-regular,
      BoldSlantedFont = lmromanslant10-bold,
      Renderer=Basic
 ]{lmroman12}

the error does not occur and the db is not reloaded. I also notice the speedup!

Notice that the font names are not case sensitive.

This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/Debian) (rev 4971)

0

You must log in to answer this question.

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