I'm using Plain TeX (and eplain, if that matters). I would like to be able to generically scale the current font, no matter how the current font has been set. For example, I want to write a macro


and I want \abitsmallerthanthecurrentfont to make the ampersand a bit smaller.

IIRC, In LaTeX, without packages, one can use \Large and \tiny and such to affect the size of the current font. But I'm not using LaTeX.

Can this be done in a straightforward way without oodles of modifications to Plain TeX?


I'd use a completely different approach:

\input eplain

\def\VandV{V\kern-.4ex\smallampersand\kern-.4ex V}

\font\my="Linux Libertine O" at 36pt


enter image description here

Note that for a logo \kern should be used, or an \hbox around the construction, as \hskip introduces a break point.

  • This is the right way to do what I want to do (the V&V logo). Thanks! – EfForEffort Feb 28 '12 at 2:43

I have a similar approach to @morbusg's: examine the \fontname. The following code retrieves the current font name and its size/scaling factor, then modifies the latter and declares a temporary font with the new size. The font is scaled by 1.2 in both directions. As a result the macro can be used recursively to get relatively bigger/smaller sizes. The font manipulation is done in a group to not accumulate the computational error.


\def\processfont#1 #2#3 #4 {%
  % Can't normally compare to 'at' here, because \fontname returns
  % characters of catcode 12
  \if a#2%
    \edef\x{\fontname\font\space scaled 1000 \relax}%
      % We have the "at" syntax
      \multiply\fontsize by #1
      \divide\fontsize by #2
      \font\tmpfont=\fname\space at \the\fontsize
      % We have the "scaled" syntax
      \multiply\fontscale by #1
      \divide\fontscale by #2
      \font\tmpfont=\fname\space scaled \the\fontscale
    \tmpfont #3%

test \bigger{test \bigger{test \bigger{test}}}

test \smaller{test \smaller{test \smaller{test}}}


enter image description here

However, this approach can't use different optical font sizes, which are the key to finest typesetting. Accounting for the optical sizes would require infrastructure that needs to know the different available optical sizes of the particular font in use, much like LaTeX already does. Therefore you might achieve better results with LaTeX and, for example, the relsize package.


I had such a clever idea: to use the result of \fontname\font as the input for a macro which loads \dimexpred smaller font. But unfortunately it has issues (I used plain XeTeX):

\font\test="Myriad Pro" at 16pt
  \def\loadnewfont"##1" ##2 ##3\relax{%
    \font\test="##1" at \the\dimexpr##3-1pt\relax\test}
\smaller \fontname\font \smaller \fontname\font
\smaller \fontname\font \smaller \fontname\font
\smaller \fontname\font % the size has vanished with the last call!?

enter image description here

  • NOTE: It seems that the 11pt rule only applies to, e.g., Minion Pro and Myriad Pro, but not to, e.g., TeX Gyre Pagella, so that would need another test in there somewhere. – morbusg Feb 25 '12 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.