### 7.13 Fonts

For signalling charts the fonts used for labels, comments, etc. can be selected in 5 ways (listed in decreasing order of preference).

1. Using the \f(font name) text formatting escape sequence. This can be applied even in the middle of a label.
2. Using the `text.font.face` attribute, in which case it applies to the whole label. The value of this attribute can also be set by styles.
3. Using the `text.font.face` chart option. It affects all subsequent labels (until the next closing brace, if any).
4. Using the `-F` command-line option.
5. By setting the `MSCGEN_FONT` environment variable.

The fonts available are system dependent. On Windows, you can use all the Windows fonts available, but only OpenType and TrueType fonts provide correct alignment. On Linux you can use whatever font backend your cairo library was compiled for. This typically includes FreeType. If you have fontconfig installed, use the `fc-list` command to list available fonts. Pick the family name in the list for use in Msc-generator.

For graphs, the font is selected exclusively via the `fontname` attribute.

For Block Diagrams the precedence is similar to that of the Signalling Charts, but instead of the `text.font.face` chart option, you can change the running style via the `use text.font.face=<font>;` command.

On the Windows GUI you can use the last panel of the ‘`Internal Editor`’ ribbon category to select the font of the internal text editor. The two checkboxes can be used to filter the list of font families offered by the lisbox below them. Note that if you plan to use non-ASCII characters in the chart text you need to select a font that can display them not only in the chart, but also for the internal editor.