Chapter 12: Typography, Layout, and Multimedia Effects

§12.1. Typography; §12.2. The Status Line; §12.3. Footnotes; §12.4. Timed Input; §12.5. Glulx Multimedia Effects

arrow-up-left.pngContents of The Inform Recipe Book
arrow-left.pngChapter 11: Out Of World Actions and Effects
arrow-right.pngChapter 13: Testing and Publishing
arrow-down-right.pngIndexes of the examples

§12.1. Typography

Story files produced by Inform tend not to contain elaborate typographical effects. They would only distract. Like a novel, a classic work of IF is best presented in an elegant but unobtrusive font. Inform does, however, provide for italic and bold-face, and also for a typewriter-style fixed pitch of lettering:

"This is an [italic type]italicised[roman type] word."
"This is an [bold type]emboldened[roman type] word."
"This is a [fixed letter spacing]typewritten[variable letter spacing] word."

Authors making very frequent use of these might like to borrow the briefer definitions in Chanel Version 1.

A very wide range of letter-forms is normally available (and even more in quoted text), so that the writer seldom needs to not worry whether, say, a sentence like

A ticket to Tromsø via Østfold is in the Íslendingabók.

will work. The Über-complète clavier is an exhaustive test of such exotica.

Coloured type is trickier, and its availability depends on the story file format. For a Z-machine game, Garibaldi 2 demonstrates this.

Finally, Tilt 3 combines unusual letterforms (suit symbols) with red and black colours to render hands of cards typographically.


arrow-up.pngStart of Chapter 12: Typography, Layout, and Multimedia Effects
arrow-left.pngBack to Chapter 11: Out Of World Actions and Effects: §11.6. Ending The Story
arrow-right.pngOnward to §12.2. The Status Line

The extension "Basic Screen Effects" provides a few more type styles, in the form of coloured lettering. The colours available are red, yellow, green, blue, white, magenta, and cyan, as well as the usual black; and to restore the player's default screen colour, we say "default letters".

Thus if we wanted to highlight locked and unlocked doors in our security readout example:

paste.png "Garibaldi"

Include Basic Screen Effects by Emily Short.

The security readout is a device. The description of the readout is "The screen is blank."

Instead of examining the switched on security readout:
    say "The screen reads: [fixed letter spacing]";
    say line break;
    repeat with item running through doors:
        say line break;
        say " [item] ([front side of the item]/[back side of the item]): [if the item is locked][green letters]LOCKED[default letters][otherwise][red letters]UNLOCKED[default letters][end if]";
    say variable letter spacing;
    say paragraph break.

The player carries the security readout.

The Docking Bay is a room. The inner airlock is a door. It is north of the Docking Bay and south of the Zocalo. The inner airlock is lockable and unlocked. The outer airlock is lockable and locked. It is a door. It is south of the Docking Bay and north of Space.

The quarantine seal is a door. It is west of the Zocalo and east of Medlab. Quarantine seal is locked.

The security pass unlocks the inner airlock. The player carries the security pass.

Test me with "x readout / turn on readout / x readout / lock inner airlock with security pass / x readout".

Note that this extension does not currently produce the desired effects when compiling with the Glulx setting; to see it working, make sure that the settings tab is set to compile to the Z-machine.

*ExampleGaribaldi 2
Adding coloured text to the example of door-status readouts.

The extension "Basic Screen Effects" provides a few more type styles, in the form of coloured lettering. The colours available are red, yellow, green, blue, white, magenta, and cyan, as well as the usual black; and to restore the player's default screen colour, we say "default letters".

Thus if we wanted to highlight locked and unlocked doors in our security readout example:

paste.png "Garibaldi"

Include Basic Screen Effects by Emily Short.

The security readout is a device. The description of the readout is "The screen is blank."

Instead of examining the switched on security readout:
    say "The screen reads: [fixed letter spacing]";
    say line break;
    repeat with item running through doors:
        say line break;
        say " [item] ([front side of the item]/[back side of the item]): [if the item is locked][green letters]LOCKED[default letters][otherwise][red letters]UNLOCKED[default letters][end if]";
    say variable letter spacing;
    say paragraph break.

The player carries the security readout.

The Docking Bay is a room. The inner airlock is a door. It is north of the Docking Bay and south of the Zocalo. The inner airlock is lockable and unlocked. The outer airlock is lockable and locked. It is a door. It is south of the Docking Bay and north of Space.

The quarantine seal is a door. It is west of the Zocalo and east of Medlab. Quarantine seal is locked.

The security pass unlocks the inner airlock. The player carries the security pass.

Test me with "x readout / turn on readout / x readout / lock inner airlock with security pass / x readout".

Note that this extension does not currently produce the desired effects when compiling with the Glulx setting; to see it working, make sure that the settings tab is set to compile to the Z-machine.

*ExampleChanel Version 1
Making paired italic and boldface tags like those used by HTML for web pages.

**ExampleTilt 3
Displaying the card suits from our deck of cards with red and black colored unicode symbols.

***ExampleThe Über-complète clavier
This example provides a fairly stringent test of exotic lettering.