The <fontmask-properties/> command

The <fontmask-properties/> directive can be used to apply one or more font characteristics to sections of document content that extend across tag boundaries. The font characteristics assigned remain active until cleared.

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.

Syntax

The command format is:

<fontmask-properties
 italic="STATE" 
 bold="STATE"
 small="STATE"
 underline="STATE"
 reverse="STATE"
 strikeout="STATE"
 color="COLOR"
/>

where :

  • A font mask characteristic is enabled if the value of STATE is one of the following: on, yes, 1, or enable. The value of STATE is not case sensitive.

  • 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.

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 set ON 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.

Example

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, simply specify a mask with no characteristic set:

<fontmask-properties/>