我正在寻找为文本模式定义半粗体 Erewhon 字体。如果没有,我愿意以同样的方式伪造它https://tex.stackexchange.com/a/290036/194729但我不知道如何改编该片段。
答案1
\documentclass{article}
\usepackage{fontspec}
\setmainfont{erewhon}
\begin{document}
One two three four five six.
{\fontspec[FakeBold=1,LetterSpace=.5]{erewhon} One two three four five six.}
{\fontspec[FakeBold=2,LetterSpace=1]{erewhon} One two three four five six.}
{\fontspec[FakeBold=3,LetterSpace=1.7]{erewhon} One two three four five six.}
{\bfseries One two three four five six.}
\end{document}
答案2
没有真正的机会获得它pdflatex
,但你可以FakeBold
与 XeLaTeX 或 LuaLaTeX 一起使用。
您还想为半粗体定义一个接口。
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Erewhon}[
Extension=.otf,
UprightFont=*-Regular,
ItalicFont=*-Italic,
BoldFont=*-Bold,
BoldItalicFont=*-BoldItalic,
FontFace={sb}{n}{Font=*-Regular,FakeBold=3},
FontFace={sb}{it}{Font=*-Italic,FakeBold=3},
]
\DeclareRobustCommand{\sbseries}{\fontseries{sb}\selectfont}
\DeclareTextFontCommand{\textsb}{\sbseries}
\begin{document}
Medium, \textsb{Semibold}, \textbf{Bold}
{\itshape Medium, \textsb{Semibold}, \textbf{Bold}}
\end{document}
如果您想用(伪造的)半粗体替换粗体:
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Erewhon}[
Extension=.otf,
UprightFont=*-Regular,
ItalicFont=*-Italic,
BoldFont=*-Regular,
BoldItalicFont=*-Italic,
BoldFeatures={FakeBold=3},
BoldItalicFeatures={FakeBold=3},
]
\begin{document}
Medium \textbf{Bold}
{\itshape Medium, \textbf{Bold}}
\end{document}