I want to scale a boxed text with very tiny font sizes.
The problem is, that on a certain scale the box gets some final vertical glue. If the text is put into a savebox, the problem starts when the savebox has a depth value of 0pt
. I guess that TeX puts in some skip value when my lines are getting too small, but I could not figure out how to prevent that effect.
The following MWE displays the problem:
\documentclass{article}
\usepackage{lmodern}
\newlength\myfontdim
\newcommand{\mytest}[1]{%
\myfontdim=#1%
\noindent\fboxsep0pt%
\fbox{\begin{minipage}{1cm}
\fontsize{\myfontdim}{\dimexpr 1.05\myfontdim}\selectfont
\parskip 0.15\myfontdim plus 0pt minus 0pt\par
A\par
in\par
Test
\end{minipage}}
}%
\begin{document}
\mytest{10pt}
\mytest{5pt}
\mytest{1pt}
\mytest{0.5pt}
\end{document}
The output is
Here, box 1 and 2 are nearly as expected and the top and bottom rule are close to the glyphs.
But, box 3 and 4 have some final glue and the bottom line does not touch the word 'Test'.
The main question is, what has to be changed such that this final glue disappears? The problem seems connected with the 0pt
depth value of boxes 3 and 4.
An additional question is, why the three text lines in the boxes have a different relative distance to each other. With the used font size and parskip value, I would have expected roughly the same (relative) distance between the text lines.