# XeLaTeX: Accents (with Linux Libertine font) require T1-fonts

I need special characters (accents, cyrillic glyphs) in my file. Cyrillic seems to work well with Linux Libertine, but accents trigger warnings:

LaTeX Font Warning: Font shape OT1/LinLibertine_R.otf(0)/m/it' undefined
(Font)              using OT1/cmr/m/n' instead on input line 26.


Question is: how do I need to fix my code/how can I use accents in this setup (xelatex + Libertine OTF fonts) without falling back to OT1/cmr?

Here is my example file:

\documentclass[a4paper,11pt]{scrreprt}

% General font-related definitions at the top! (Taken from
\usepackage{xunicode}
\usepackage{fontspec}
\usepackage{xltxtra}
\usepackage{polyglossia}
%\usepackage{csquotes} % Causes some error messages?

% Load font from current working directory.
\setmainfont[
BoldFont          = LinLibertine_RZ.otf,
ItalicFont        = LinLibertine_RI.otf,
BoldItalicFont    = LinLibertine_RZI.otf,
Ligatures=TeX]{LinLibertine_R.otf}
\setsansfont[
BoldFont          = LinBiolinum_RB.otf,
ItalicFont        = LinBiolinum_RI.otf,
BoldItalicFont    = LinBiolinum_RI.otf, % FIXME?!
Ligatures=TeX]{LinBiolinum_R.otf}
\setmainlanguage{german}
\setotherlanguage{russian}

\begin{document}
.\\
zas\'{y}pat’\\ % This is line 27.
zasypat’\\
\end{document}


(I have all the *.otf files in my current working directory.)

• Avoid loading xunicode (and also xltxtra). Instructions telling to load them are largely outdated. – egreg Jul 8 '14 at 12:01
• And instrutions telling to load xunicode before fontspec are plainly wrong - even on old systems. xunicode must always be loaded after fontspec so that it can pick up the correct encoding. – Ulrike Fischer Jul 8 '14 at 13:12
• I see, thanks! Without loading these two packages, accents seem to work flawlessly and without warnings. I guess I should suggest a fix for linuxlibertine.org/fileadmin/user_upload/PDF/…, from which I have taken my preambel. – mfuglos Jul 13 '14 at 0:47

Don't load xunicode along with fontspec. Instructions telling you to do so are very outdated. Also xltxtra is not needed, for the same reason.
There has been a period of time when loading xunicode was recommended; but this was at the initial stages of development of fontspec. Since some years, fontspec loads xunicode at the right point, so there are two cases:
1. the call to xunicode comes before than fontspec, which will cause problems;
2. the call to xunicode comes later than fontspec, which is useless.
The conclusion is obvious. ;-)