I am using XCharter
and tgheroes
. Although I do not use the sans in running text, I'd like to scale it accordingly.
Is there any other way than just to do some T&E with the settings? Fontspec's options are really handy in that regard (the ones I know, at least).
I think what the issue is actually based on… which measure does the scale
-option for TeX Gyre Heros scale?
("spoiler": the best value for the code below seems to be 0.9)
Picture of MWE output
MWE
\documentclass[
fontsize=12pt,
]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\KOMAoptions{fontsize=11pt}
\usepackage{amsmath}
\usepackage{sansmath}
%
\usepackage[scale=0.96]{tgheros}
\usepackage{tgheros}
\usepackage[bitstream-charter,expert]{mathdesign}
\usepackage[sups]{XCharter}
\usepackage{beramono}
\begin{document}
\begin{center}
\begin{tabular}{rl}
\verb+AAaa\textsf{aaAA}AA+ & AAaa\textsf{aaAA}AA\\
\bfseries\verb+AAaa\textsf{aaAA}AA+ & \bfseries AAaa\textsf{aaAA}AA\\
\verb+XXxx\textsf{xxXX}XXxx+ & XXxx\textsf{xxXX}XXxx\\
\bfseries \verb+XXxx\textsf{xxXX}XXxx+ & \bfseries XXxx\textsf{xxXX}XXxx\\
\end{tabular}
\end{center}
Something else:
\begin{equation}
\sum_{x=3}^{12} \sin(x) \cdot \pi
\end{equation}
\end{document}}
Best Answer
In general this is quite difficult to attain, because each font package has different ideas; for instance, some packages have the
scale
options, others havescaled
, most have neither.In your case you're lucky, because both
tgheros
andberamono
support scaling, the former withscale
, the latter withscaled
.The simplest way is to prepare a document such as
You get
Now you know that Beramono and TeX Gyre Heros have to be scaled down. How much? Use a pocket calculator:
so you can do your scaling:
Why the strange
\expandafter\let\csname T1+fvm\endcsname\relax
?The
mathdesign
package has its own ideas about what's the right scaling of Bera Mono. That instruction makes LaTeX think it doesn't.