How to define new length using :
\newlength{...}
\setlength{...}{...}
and equal to the line height of a particular font (for example \tiny\ttfamily
)
Note : I want a solution which does not involve writing anything in the \begin{document}\end{document}
part.
Best Answer
This will loop on all characters (from 0 to 255), so it's good only for
pdflatex
; some different heuristics would be needed for XeLaTeX or LuaLaTeX withfontspec
.The length
\fonttotalheight
is defined to be the height plus depth, unless the*
-variant is used, which will measure only the height, disregarding descenders.