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 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:

\documentclass{scrbook}

\usepackage{fontspec}
\usepackage{xunicode}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{Linux Libertine O}
\newfontfamily\lettrinefont{Linux Libertine Initials O}

\usepackage{blindtext}

\begin{document}

\blinddocument

\end{document}

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 },
   ["fontname"]="LinLibertineIO",
   ["fullname"]="Linux Libertine Initials O",
   ["names"]={
    ["family"]="Linux Libertine Initials O",
    ["fullname"]="Linux Libertine Initials O",
    ["psname"]="LinLibertineIO",
    ["subfamily"]="Initials",
   },
   ["size"]={},
   ["slant"]=0,
   ["weight"]=400,
   ["width"]=5,
  },

Am I missing something?

share|improve this question
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

2 Answers 2

this seems to work: \newfontface\lettrinefont{LinLibertineIO}


share|improve this answer
up vote 4 down vote accepted

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

\newfontfamily\lettrinefont{LinLibertineIO}

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...

share|improve this answer
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

 
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.