# XeLaTeX can't find font

Yes, I've seen this question. It is (1) five years old, (2) answered with answers that do not work for me, and (3) I don't have enough reputation to comment (and posting question as an answer seems wrong).

The situation is kinda baffling for me. I am trying to compile the Cyrillic Hello World proposed by Grigory M, and whatever I do, XeLaTeX just refuses to load any system font.

What I've done:

• Made sure Linux Libertine is installed;
• Tried running fc-list and using other fonts in the document;
• Tried using the *.otf file name as an argument of the \newfontfamily\russianfont command, as suggested here;
• Tried copying the *.otf files in ~/.fonts, then running fc-cache -f -v as root AND also as normal user
• Tried copying the texlive-fontconfig.conf file from /var/lib/texmf/fonts/conf to /etc/fonts/conf.d/09-texlive.conf, then running fc-cache -fsv as root as suggested here.

Nothing helped. I just keep seeing the same error:

fontspec error: "font-not-found"! The font "Linux Libertine" cannot be found. ...sianfont[Script=Cyrillic]{Linux Libertine}


Full log is here.

I am using TeXLive2016 on OpenSuSE 13.2. I've installed it by enabling the TeXLive RPM repo, which is essentially a tool to convert the CTAN files into RPM packages.

Any help will be very appreciated.

For the sake of completeness, here's the code itself:

\documentclass{article}
\usepackage{fontspec} % loaded by polyglossia, but included here for transparency
\usepackage{polyglossia}
\setmainlanguage{russian}
\setotherlanguage{english}

% XeLaTeX can use any font installed in your system fonts folder
% Linux Libertine in the next line can be replaced with any
% OpenType or TrueType font that supports the Cyrillic script.

\newfontfamily\russianfont[Script=Cyrillic]{Linux Libertine}

\begin{document}
Привет
\begin{english}
Hello!
\end{english}
\end{document}

• We'll probably need more of your log file. Also, please include a complete MWE here rather than just linking to the other question so that your question still makes sense if that other answer gets edited. For what it's worth, on my system, it finds the font but says it does not provide Cyrillic. – cfr Jun 28 '16 at 23:43
• How did you install TeX Live exactly? – cfr Jun 28 '16 at 23:44
• What does fc-match "Linux Libertine" return? If it doesn't find the font, perhaps it needs a different name on your system. How did you install Linux Libertine? Your question suggests you might have done this manually. If so, uninstall it, update the caches and then install using OpenSuse's package manager (can't remember what it uses, but whatever it is). – cfr Jun 29 '16 at 0:19
• Same here, font not found on texlive 2016; but it compiles fine when using any of the *.otf font from fc-list | grep -i libertin, for example \newfontfamily\russianfont[Script=Cyrillic]{libertinusserifdisplay-regular.otf}: i.imgur.com/bWUMcdb.png – alwaysask Jun 29 '16 at 0:37

It turns out that I actually had to specify the name of the *.otf file (instead of the abstract human-readable name of the font) as the argument of the \newfontfamily\russianfont command, as it was suggested here. The only thing that was wrong in that post was that you have to specify the complete file name (with extension).
• But this doesn't really explain why it doesn't work otherwise. It should work. That it doesn't suggests a problem with fontconfig or with something related to TeX. – cfr Jun 29 '16 at 0:54
• +1 to this. I'm having the same problem and my file will only compile if I type the font exactly as the filename, including the extension .otf. Don't know why tho, all examples I've seem online used the font name instead of file name. – Mateus Felipe Feb 18 '19 at 19:49