4

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.

3
  • 5
    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. Commented Jun 27, 2017 at 1:56
  • 2
    Note that if you had the fonts installed, you wouldn't need to specify the individual font files this way. (Probably.) Commented Jun 27, 2017 at 1:57
  • 1
    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.) Commented Jun 27, 2017 at 5:20

1 Answer 1

5
\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} 

enter image description here

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

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.