Font hack to make sure that italic bold is not too wide.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2021-02-25 20:59:01 +00:00
parent a81cfdb693
commit 68cb4c6d5f
1 changed files with 6 additions and 1 deletions

View File

@ -117,7 +117,12 @@
% XeTeX and LuaLaTeX require the \fontencoding{T1}:
% <https://tex.stackexchange.com/a/426300/78411>
%
\renewcommand{\emph}[1]{\hspace{0.15em}{\fontencoding{T1}\fontfamily{pnc}\selectfont\scalebox{1.02}[0.999]{\textit{#1}}}\hspace{0.02em}}
% New Century Schoolbook italic bold is too wide, so we use a terrible hack
% to change it back to Quattrocentro slanted bold.
\let\oldtextbf\textbf
\newcommand{\bfithack}[1]{{\hspace{-0.1em}\fontfamily{\familydefault}\itshape\bfseries\selectfont\scalebox{0.98}[1.001]{#1}}}
\renewcommand{\emph}[1]{\hspace{0.15em}{\fontencoding{T1}\fontfamily{pnc}\selectfont\scalebox{1.02}[0.999]{%
\let\textbf\bfithack\textit{#1}\let\textbf\oldtextbf}}\hspace{0.02em}}
% While we're at it, let's match the tt x height to Quattrocento as well,
% and compress it a little to save space in tables.