I switched my working document from pdfLaTeX to XeLaTeX. I have a problem with the font, because now Computer Modern Roman doesn't display bold, italic and small caps text (it works only in one page if I say \usefont{T1}{cmr}{m}{n}\selectfont
).
Ex in my images caption, I've said in preamble labelfont={sc,color=blue}, textfont={small,it}, labelsep=endash
what is working except for it and sc. And \textit
, \textbf
, \textsc
are not working in all the document :
This is a MWE :
%%Classe du document
\documentclass[11pt,oneside]{book}
\usepackage[labelfont={sc,color=blue}, textfont={small,it}, labelsep=endash]{caption}
\usepackage{subcaption}
\usepackage[cm-default]{fontspec}
\usepackage{xunicode}
\DeclareTextCommandDefault{\nobreakspace}{\leavevmode\nobreak\ }
%%Pour insérer des images
\usepackage{graphicx}
%%Le document est en français
\usepackage{polyglossia}
\setdefaultlanguage{french}
\usepackage{cmlgc}
\begin{document}
{\huge\textsc{Sans la liberté de blâmer, il n'est point d'éloge flatteur. }}
\begin{figure}
\includegraphics{image.png}
\caption{Beaumarchais}
\end{figure}
\end{document}
Best Answer
It looks like cmlgc package is not compatible with Unicode fonts as used by xetex, if I remove that the font warnings go and you get small caps output