I want to prepare view of LCD display that can have 8 lines of big text or 16 lines of small text. The sizes may be mixed so some lines will be with small font while some with big font at once.
Unfortunately strange things happen with distance between lines. What am I doing wrong?
Code
\documentclass{article}
\newcommand{\fontsmall}{\fontsize{5pt}{6pt}\selectfont}
\newcommand{\fontnormal}{\fontsize{10pt}{12pt}\selectfont}
\newsavebox{\mybox}
\newenvironment{display}{%
\fontnormal%
\begin{lrbox}{\mybox}%
\begin{minipage}[][8\baselineskip][t]{15\baselineskip}%
}{%
\end{minipage}%
\end{lrbox}\fbox{\usebox{\mybox}}
}
\begin{document}
\begin{display}%
linie 1\\
linie 2\\
linie 3\\
linie 4\\
linie 5\\
linie 6\\
linie 7\\
linie 8
\end{display}%
\begin{display}%
\fontsmall
linie 1\\
linie 2\\
linie 3\\
linie 4\\
linie 5\\
linie 6\\
linie 7\\
linie 8\\
linie 9\\
linie 10\\
linie 11\\
linie 12\\
linie 13\\
linie 14\\
linie 15\\
linie 16
\end{display}%
\begin{display}%
\fontsmall
\hfill \today\\
~\\
\fontnormal
some text \hfill some text \hfill some text\\
some text \hfill some text \hfill some text\\
some text \hfill some text \hfill some text\\
\fontsmall
linie 9\\
linie 10\\
linie 11\\
linie 12\\
linie 13\\
linie 14\\
linie 15\\
linie 16
\end{display}%
\begin{display}%
\fontsmall
\hfill \today\\
~\\
\fontnormal
some text \hfill some text \hfill some text\\
some text \hfill some text \hfill some text\\
some text \hfill some text \hfill some text\\
\fontsmall
linie 9\\
linie 10\\
linie 11\\
linie 12\\
linie 13\\
linie 14\\
linie 15\\
linie 16
\fontnormal
\end{display}%
\begin{display}%
\fontsmall
\hfill \today\\
\fontnormal
some text \hfill some text \hfill some text\\
some text \hfill some text \hfill some text\\
some text \hfill some text \hfill some text\\
\fontsmall
linie 8\\
linie 9\\
linie 10\\
linie 11\\
linie 12\\
linie 13\\
linie 14\\
linie 15\\
linie 16
\fontnormal
\end{display}%
\end{document}
Result