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-listand using other fonts in the document; - Tried using the
*.otffile name as an argument of the\newfontfamily\russianfontcommand, as suggested here; - Tried copying the
*.otffiles in~/.fonts, then runningfc-cache -f -vas root AND also as normal user - Tried copying the
texlive-fontconfig.conffile from/var/lib/texmf/fonts/confto/etc/fonts/conf.d/09-texlive.conf, then runningfc-cache -fsvas 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}
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 00:19LinLibertine_R.otf: "Linux Libertine O" "Regular". This doesn't work, it is true. But it does find the font. – cfr Jun 29 '16 at 00:20I get exactly the same output.
Using OpenSuse's package manager.
– ScumCoder Jun 29 '16 at 00:21polyglossiaout so you just have English with a\setmainfont{Linux Libertine}. – cfr Jun 29 '16 at 00:29graphicxin order to fake TIPA stuff. Or just to confuse me ;). – cfr Jun 29 '16 at 00:30xelatex ./document.tex. – ScumCoder Jun 29 '16 at 00:36fc-list | grep -i libertin, for example\newfontfamily\russianfont[Script=Cyrillic]{libertinusserifdisplay-regular.otf}: http://i.imgur.com/bWUMcdb.png – alwaysask Jun 29 '16 at 00:37otfinfo -ito check the name of the OTF font. I suspect that the font you're using is the the one I'm getting, anyway, because it certainly doesn't compile fine for me - it just finds the font OK. – cfr Jun 29 '16 at 00:56Linux Libertine O@alwaysask rather thanLinux Libertine. I also need to comment out the\russianfontdefinition in order to not get empty boxes. – cfr Jun 29 '16 at 01:02\newfontfamily\russianfont[Script=Cyrillic]{Linux Libertine O}works fine too. By the way,fc-match "Linux Libertine"returnsDejaVuSans.ttf: "DejaVu Sans" "Book"on my system. – alwaysask Jun 29 '16 at 01:11