# \definetypeface

## Syntax

 \definetypeface[...][...][...][...][...][...] [...] TEXT (typescript identifier) [...] rm ss tt mm hw cg ("basic style") [...] IDENTIFIER (existing font set) [...] IDENTIFIER (existing font set) [...] IDENTIFIER (?) [...] features = IDENTIFIER rscale = NUMBER encoding = IDENTIFIER text = IDENTIFIER

## Description

\definetypeface sets up a typeface for use within a typescript.

The third and fourth arguments to \definetypeface are pointers to already declared font sets; these are deﬁned elsewhere. Table 5.8 gives the full list of predeﬁned typescripts (the ﬁrst argument of \starttypescript) and font sets that are attached to the styles (the third and fourth argument of each \definetypeface). The names in the third argument (like serif and sans) do not have the same meaning as the names used in \setupbodyfont. Inside \setupbodyfont, they were keywords that were in- ternally remapped to one of the two-letter internal styles. Inside \definetypeface, they are nothing more than convenience names that are attached to a group of fonts by the person that wrote the font definition. They only reﬂect a grouping that the person believed that could be a single font style. Oftentimes, these names are identical to the official style keywords, just as the typescript and typeface names are often the same, but there can be (and sometimes are) different names altogether.

How to deﬁne your own font sets is explained in the reference manual, but there are quite a few predeﬁned font sets that come with ConTEXt; these are all listed in the four tables 5.9, 5.10, 5.11, and 5.12. For everything to work properly in MkII, the predefined font sets also have to have an encoding attached, you can look those up in the relevant tables as well.

The fifth argument to \definetypeface specifies specific font size setups (if any), these will be covered in the reference manual. Almost always, specifying default will suffice.

The optional sixth argument is used for tweaking font settings like the specification of font features or adjusting parameters. In this case, the two modern font sets are loaded with a small magnification, this evens out the visual heights of the font styles.

## Example

```\starttypescript [palatino] [texnansi,ec,qx,t5,default]
\definetypeface[palatino] [rm] [serif][palatino] [default]
\definetypeface[palatino] [ss] [sans] [modern] [default] [rscale=1.075]
\definetypeface[palatino] [tt] [mono] [modern] [default] [rscale=1.075]
\definetypeface[palatino] [mm] [math] [palatino] [default]
\stoptypescript
```

This defines a typescript named palatino in five different encodings. When this typescript is executed via \usetypescript, it will define four typefaces, one of each of the four basic styles rm, ss, tt, and mm.