next up previous contents
Next: Encodings Up: Font installation Previous: Font file loading information

Size functions

 

LaTeX provides the following size functions, whose `inputs' are <fontarg> and <optarg> (when present).

`' (empty)
Load the external font <fontarg> at the user-requested size. If <optarg> is present, it is used as the scale-factor.

s
Like the empty function but without terminal warnings, only loggings.

gen
Generates the external font from <fontarg> followed by the user-requested size, e.g. <<8>> <<9>> <<10>> gen * cmtt

sgen
Like the `gen' function but without terminal warnings, only loggings.

genb

Generates the external font from <fontarg> followed by the user-requested size, using the conventions of the `ec' fonts. e.g. <<10.98>> genb * dctt produces dctt1098.

sgenb

Like the `genb' function but without terminal warnings, only loggings.

sub
Tries to load a font from a different font shape declaration given by <fontarg> in the form <family>/<series>/<shape>.

ssub
Silent variant of `sub', only loggings.

subf
Like the empty function but issues a warning that it has to substitute the external font <fontarg> because the desired font shape was not available in the requested size.

ssubf
Silent variant of `subf', only loggings.

fixed
Load font <fontarg> as is, disregarding the user-requested size. If present, <optarg> gives the ``at ...pt'' size to be used.

sfixed
Silent variant of `fixed', only loggings.

Examples for the use of most of the above size functions can be found in the file cmfonts.fdd--the source for the standard .fd files describing the Computer Modern fonts by Donald Knuth.


\DeclareSizeFunction {<name>} {<code>}

Declares a size-function <name> for use in \DeclareFontShape commands. The interface is still under development but there should be no real need to a define new size functions.

The <code> is executed when the size or size-range in \DeclareFontShape matches the user-requested size.

The arguments of the size-function are automatically parsed and placed into \mandatory@arg and \optional@arg for use in <code>. Also available, of course, is \f@size, which is the user-requested size.

To signal success <code> must define the command \external@font to contain the external name and any scaling options (if present) for the font to be loaded.

This example sets up the `empty' size function (simplified):

   \DeclareSizeFunction{}
           {\edef\external@font{\mandatory@arg\space at\f@size}


next up previous contents
Next: Encodings Up: Font installation Previous: Font file loading information

Rainer Schoepf
Thu Jan 8 11:52:24 MET 1998