Previous: Command-Line Referece, Up: Usage Reference [Contents]

### 7.14 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) and/or the \l(language code) text formatting escape sequences31. These can be applied even in the middle of a label.
2. Using the `text.font.face` and/or the `text.font.lang` attributes, in which case they apply to the whole label. The value of these attributes can also be set by styles.
3. Using the `text.font.face` and/or `text.font.lang` chart options. They affect all subsequent labels (until the next closing brace, if any).
4. Using the `-F` command-line option.
5. By setting the `MSCGEN_FONT` and/or `MSCGEN_FONT_LANG` environment variables.

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 or Mac, FontConfig is used and you can use fonts installed with it. Use the `fc-list` command to list available fonts. Pick the family name in the list for use in Msc-generator. You can also specify the language you want (see above), this impacts the font selected so that it contains the glyphs needed by the language you specify.

For graphs, the selection is similar, but the name of the attribute is `fontname` and there you need to use the `node [fontname=<face>];` to impact all subsequent nodes. There is no way to set the language except from the `\l()` text formatting escape.

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. (And similar for the language.)

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.

Finally, when you start Msc-generator with the `MSCGEN_NOFONT` environment variable set (to any non-empty value other than ‘`0`’), no fonts will be drawn to the output. The area occupied by any text will be left empty (but included in layout calculation). This is useful for testing.

#### Footnotes

##### (31)

Use the RFC 3066 style language names. See a list of examples here.

Previous: Command-Line Referece, Up: Usage Reference [Contents]