I am trying to set a length to the height of a heading. I have the following snippet.
% heading height
\settoheight{\headingh}{\Huge{\textbf{\heading}}}
\centering\Huge\textbf{\heading}\rule{0.1mm}{\headingh}
The result of which is the following.
As you can see, the letter is slightly taller than the rule. If I run \settoheight on the rule, the resulting length is the same as the \headingh length.
Here is a minimum reproducible example.
\documentclass[11pt]{article}
\usepackage[scaled]{helvet}
\renewcommand*\familydefault{\sfdefault}
\usepackage[T1]{fontenc}
\newlength{\headingh}
\begin{document}
\settoheight{\headingh}{\Huge\textbf{A}}
\Huge\textbf{A}\rule{0.1mm}{\headingh}
\end{document}
I have used the same font as in the original, but the same effect is present even when the default font is used, i.e. with lines 2-4 commented out.
