I have a document using fontspec which works fine with XeTeX, but a the Linux Libertine Initialis O font is not found when compiling with LuaTeX:

Here is a MWE reproducing the problem:


\setmainfont{Linux Libertine O}
\newfontfamily\lettrinefont{Linux Libertine Initials O}





With lualatex (TL2011), it returns:

! fontspec error: "font-not-found"
! The font "LinuxLibertineInitialsO" cannot be found.
! See the fontspec documentation for further information.
! For immediate help type H <return>.

l.7 ...ly\lettrinefont{Linux Libertine Initials O}

Here is the font in fc-list:

Linux Libertine Initials O:style=Initials

My ~/.texlive2011/texmf-var/luatex-cache/generic/names/otfl-names.lua also contains an entry for this font:

   ["familyname"]="Linux Libertine Initials O",
   ["filename"]={ "fxli.otf", false },
   ["fullname"]="Linux Libertine Initials O",
    ["family"]="Linux Libertine Initials O",
    ["fullname"]="Linux Libertine Initials O",

Am I missing something?

  • 1
    Well the font name is LinLibertineIO. So I tried \newfontfamily\lettrinefont{LinLibertineIO} and this works for me with lualatex. (It works with xelatex too but is slower than the other name.) – Ulrike Fischer Aug 19 '11 at 15:11
  • I eventually figured that out from reading otfl-names.lua, but how am I supposed to find that name with fc-list? – ℝaphink Aug 19 '11 at 15:12
  • I think luaotfload fails to find it because of the Initials subfamily (naturally the code will be looking for Regular and its aliases). Using LinLibertineIO works because the code fallbacks to looking for psname as a last resort. It is messy code, but someone else have to fix it, I'm no longer interested in LaTeX. – Khaled Hosny Aug 19 '11 at 19:48

Using the name as specified in the otfl-names.lua works:


However, I don't know why it worked for other fonts without using this name, and how I'm supposed to guess this name from the output of fc-list...

  • 3
    luaotfload does not use fontconfig for locating fonts, there is no guarantee the behaviour will always be the same. – Khaled Hosny Aug 19 '11 at 19:53

Your Answer

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

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