I am struggling with font selection. I just cant seem to get a grasp on this.
I have a document class I'm developing which uses Latin Modern Roman, Trajan Pro, and Trajan Pro Bold. My needs are to define the Trajan fonts to small caps and bold small caps while using LRM for everything else.
I cannot figure out why the following [options]
causes an error, or how to get around it.
\documentclass[11pt]{article}
\usepackage{geometry} %for page layout
\geometry{hmargin={1in,1in},vmargin={0.75in,0.75in},marginparwidth={0.8in},marginparsep={0in}}
\usepackage{fontspec} %for xelatex unicode
\setmainfont{Latin Modern Roman}[
UprightFeatures = {SmallCapsFont=TrajanPro-Regular.otf},
BoldFeatures = {SmallCapsFont=TrajanPro-Bold.otf},
]
\begin{document}
Here is some {\bfseries\scshape Boldface SmallCaps} text
Here is some {\bfseries\uppercase{Boldface Uppercase}} text
Here is some {\bfseries Boldface} text
Here is some {\scshape SmallCaps} text
Here is some \uppercase{Uppercase} text
Here is some {Regular} text
\end{document}
As an edit, I have added the following work around code I have been using for almost 5 years. This works just fine. everywhere I would want to type \scshape
I just have typed \sffamily
instead. I know its wrong to do so but in over 5 years of trying to figure out a better way I never have.
\RequirePackage{fontspec} %for xelatex unicode
\setmainfont{Latin Modern Roman}
% BoldFont = ⟨font name⟩
% ItalicFont = ⟨font name⟩
% BoldItalicFont = ⟨font name⟩
% SlantedFont = ⟨font name⟩
% BoldSlantedFont = ⟨font name⟩
% SmallCapsFont = ⟨font name⟩
\setsansfont{TrajanPro-Regular.otf}[
BoldFont=TrajanPro-Bold.otf
% ItalicFont = ⟨font name⟩
% BoldItalicFont = ⟨font name⟩
% SlantedFont = ⟨font name⟩
% BoldSlantedFont = ⟨font name⟩
% SmallCapsFont = ⟨font name⟩
]
As one more edit, LRM is a system installed font, the Trajan fonts are two files I keep with my projects in the root directory. I would like to be able to put them into a font folder inside the root, but one step at a time.