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 runningfc-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 runningfc-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}
Best Answer
Ok, I got this (thanks a bunch @alwaysask).
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).