3

I am currently using \documentclass[12pt,oneside]{article}, so 12pt size. However, I decided to change the font by using

\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}

and suddenly the font got bigger (not sure what size though, I will attach pictures for comparison purposes. Same resolution, same chapter size, however the text in the body is obviously bigger). So my question is, how can I avoid that?

[enter image description here] [enter image description here]

4
  • Which font family were you using before switching to the Helvetica clone?
    – Mico
    Commented Oct 16, 2022 at 19:06
  • The default one in overleaf? I havent picked one out specifically, everything I used was \documentclass[12pt,oneside]{article} Commented Oct 16, 2022 at 19:23
  • 1
    helvetica has a much bigger x-height than computer modern so lowercase is larger if you keep uppercase the same but you can use \usepackage[scaled=0.9]{helvet} or whatever Commented Oct 16, 2022 at 19:51
  • the declared font sizes are the same but a font size is just a label, not a length that can be measured both are 12pt fonts. Commented Oct 16, 2022 at 19:55

2 Answers 2

6

Computer Modern -- the default (serif) font for all TeX systems I'm familiar with -- and Helvetica differ strongly across several categories. Among these are x-heights, ascender heights, stroke thickness, and compactness/condensedness.

I take it from your posting that you want to equate the x-heights of the two fonts. To do so, load the helvet package with the option scaled=0.835. (I arrived at the value 0.835 by casual empiricism.)

enter image description here

\documentclass[12pt,oneside]{article}

% scaled=0.835 to equate x-heights of Computer Modern and Helvetica
% scaled=0.935 to equate ascender heights of Computer Modern and Helvetica
\usepackage[scaled=0.835]{helvet} 
%%\renewcommand{\familydefault}{\sfdefault}

\begin{document}
xxx\textsf{xxx}xxx

Lorem ipsum dolor sit \textsf{Lorem ipsum dolor sit}

\end{document}
5

Prepare the following input file:

\documentclass[12pt]{article}

\usepackage{helvet}

\begin{document}

\newlength{\cmheight}
\newlength{\helvheight}

\settoheight\cmheight{x}
\settoheight\helvheight{\sffamily x}

\fpeval{round(\cmheight/\helvheight,5)}

\settoheight\cmheight{A}
\settoheight\helvheight{\sffamily A}

\fpeval{round(\cmheight/\helvheight,5)}

\end{document}

You may need \usepackage{xfp} if you aren't running the most recent LaTeX release.

Upon running LaTeX you'll get

0.8272
0.9458

These are the scale factors for the two cases you may want: in the first case the x-height of Helvetica will be the same as Computer Modern; in the second case the height of capital letters will be the same.

Indeed, in Helvetica the ratio between x-height and capital letter height is different than in Computer Modern.

Now let's make a couple of experiments.

First experiment: same x-height

\documentclass[12pt]{article}

\usepackage[scaled=0.8272]{helvet}

\begin{document}

Abcdef\textsf{Abcdef}

x\textsf{x}

\end{document}

enter image description here

Second experiment: same capital letter height

\documentclass[12pt]{article}

\usepackage[scaled=0.9458]{helvet}

\begin{document}

Abcdef\textsf{Abcdef}

x\textsf{x}

\end{document}

enter image description here

Conclusion

If you want all the document in Helvetica, decide whatever scaling you seem fit, between the two given bounds.

I'd probably go with 0.94

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .