\def\fitbox#1{% \font\custfont=phvr scaled 1000% define a Helvetica Regular font of known size \setbox0=\hbox{\custfont #1}% render our text in that font \dimen0=5cm% the target width \dimen1=\wd0% the observed width \divide\dimen1 by 1000% normalize \divide\dimen0\dimen1% dimen0 becomes the font enlargement factor \count0=\dimen0% convert dimen to a count \font\custfont=phvr scaled \count0% redefine the font \hbox{\custfont #1}% render the box again, this time for real }