# How do I add bold, smallcap font?

I've got this:

    \usepackage{fontspec}
\setmainfont{Equity_Text_B_Regular.otf}[
BoldFont          = Equity_Text_B_Bold.otf ,
ItalicFont        = Equity_Text_B_Italic.otf ,
BoldItalicFont    = Equity_Text_B_Bold_Italic.otf ,
SmallCapsFont     = Equity_Caps_B_Regular.otf ]


And I have another font file in my project directory called Equity_Caps_B_Bold.otf. I want the following text to print in bold, smallcaps, but it is printing in regular, smallcaps:

    \centerline{\bf{\textsc {\CourtNameOne}}}


What's the best practice for adding bold, smallcaps when my font family has a specific file for that? I'm using the LuaTeX engine.

• Welcome! \bf is 20+ years obsolete and ought not be used in LaTeX. \centerline is also usually wrong, as I understand it. The fontspec manual explains how to do what you need. – cfr Jun 27 '17 at 1:56
• Note that if you had the fonts installed, you wouldn't need to specify the individual font files this way. (Probably.) – cfr Jun 27 '17 at 1:57
• Instead of \bf{\textsc {\CourtNameOne}, you should definitely write \textbf{\textsc{\CourtNameOne}}. Your main challenge will be to inform fontspec how to access the bold-smallcaps font combination. (I'm afraid I can't give any advice on that since I don't have access to any of the Equity_... fonts.) – Mico Jun 27 '17 at 5:20

\documentclass{article}

\usepackage{fontspec}
\setmainfont{EquityTextB}[
BoldFont          = *-Bold,
ItalicFont        = *-Italic,
BoldItalicFont    = *-BoldItalic,
SmallCapsFont     = EquityCapsB,
BoldFeatures      = {SmallCapsFont=EquityCapsB-Bold}
]
\begin{document}

\textsc {CourtNameOne}
\textbf{\textsc {CourtNameOne}}

\end{document}


This definition should also work, fontspec will find all fonts:

\setmainfont{EquityTextB}[
SmallCapsFont = EquityCapsB,
BoldFeatures  = {SmallCapsFont=EquityCapsB-Bold}
]