I'm newbie in XeLaTeX and have to adopt already typeset (in LaTeX) textbook with the Computer Modern Roman mainfont. So I want to have slanted text, while the compiler with default introduction (taken somewhere)
\usepackage[T2A]{fontenc}
\usepackage[russian]{babel}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures={TeX},Renderer=Basic}
\setmainfont{CMU Serif Roman}
\setsansfont{CMU Sans Serif}
\setmonofont{CMU Typewriter Text}
(and latex-preserved commands \textsl{}
and \slshapr
for the usage)
writes that slanted text is replaced by the simple italic.
I tried in two ways: (I) load the font cmunsl.otf as overall-windows-installed and tried to use it as independent new font:
\font\wslant="CMU Serif Extra RomanSlanted" at 12pt
(II) In the fontspec documentation (p.11) I found that the slanted font can be added as an option to the \setmainfont
; I tried (a)
\setmainfont[SlantedFont = CMU Serif Extra RomanSlanted]{CMU Serif Roman}
and (b)
\setmainfont[SlantedFont = cmunsl.otf]{CMU Serif Roman}
(this OTF-file cmunsl.otf is presented in the folder
C:\texlive\2016\texmf-dist\fonts\opentype\public\cm-unicode\)
In all cases the error is 'your font is not found'. The same if I declare Path explicitly: \setmainfont[Path=...,SlantedFont =...]
Could anybody help with proper font declaration and proper usage in the text? In the questions with tag 'slanted' I did not found the solution for the main font family.
Thanks