The <fontmask-properties/> command

Assigns one or more font characteristics to content that extends across tag boundaries.

Where allowed

Any mapping.

Range of effect

The font characteristics assigned remain active until cleared by a subsequent <fontmask-properties/> directive. For example, changed content is often identified by processing instructions that define the start and end of the change. In many cases the change extends across structural tag boundaries. Changes of this form can be visually identified by declaring a font mask at the start of the change (say, to force underlining) and clearing the font mask at the end of the change.

Font characteristics

The following characteristics may be enabled. Any characteristic that is not explicitly set is disabled (within the font mask). See below for how the font mask interacts with font properties set via normal mappings. The value assigned to a font characteristic is not case sensitive.

bold

Enables boldface characters. The value is one of on, yes, 1, or enable.

italic

Enables italic (oblique) characters. The value is one of on, yes, 1, or enable.

reverse

Enables reversed foreground and background colors. The value is one of on, yes, 1, or enable.

small

Enables small characters. The value is one of on, yes, 1, or enable.

strikeout

Strikes through the text.. The value is one of on, yes, 1, or enable.

underline

Enables underlined text. The value is one of on, yes, 1, or enable.

color

Specifies the current font color. See “Colors” for a description of how colors are specified.

Font mask operation

Characteristics in a font mask interact with the underlying state of the font (set in mappings) as follows:

  • If the characteristic is enabled in the mask, then it will be applied to the current text regardless of what the mappings specify.

  • If the characteristic is not enabled in the mask, then the text will be set as specified in the mappings. Thus the default mask (nothing set) has no effect on the output.

The following example shows how to specify a font mask that enables a red strikeout effect :

<fontmask-properties strikeout="yes" color="red" />

As stated above, this will also disable all characteristics other than strikeout and color. If you need to maintain the current mask state of another characteristic (for example, bold), you must store that state in a user variable and explicitly re-enable it:

<fontmask-properties strikeout="yes" color="red" bold="{Bold}" />

To clear all current mask characteristics, specify a mask with no characteristic set:

<fontmask-properties/>