| Chapter 5: Text |

| 5.7. Text with type styles

Inform does not go in for the use of fonts: a work of IF will be rendered with different fonts on different machines anyway, from tiny personal organisers up to huge LCD panelled workstations. However, it does allow for a modest amount of styling. The substitution "[bold type]" switches to bold face; "[italic type]" to italic; and "[roman type]" back to plain roman. Thus

> "This is [italic type]very suspicious[roman type], said Peter."

will (on most computers) be rendered as

> This is very suspicious, said Peter.

Less is more with such devices, but there is one other effect we can employ: we can go into "[fixed letter spacing]" for a while, then return to "[variable letter spacing]", which is the normal condition. In variable letter spacing, a lower case "m" is much wider than an "l", which is natural to the eye since it has been printing practice since the Renaissance. Fixed letter spacing is more like typewriting, and it is best used to reproduce typewritten text or printed notices; it can also be convenient for making simple diagrams.

We should be careful to ensure that we return to the status quo ante (roman type and variable letter spacing) after any specially-treated text has been printed.

56
| Example Garibaldi 2 Adding coloured text to the example of door-status readouts.

Previous | Contents | Next