font (Domino DTD)

Represents a font in rich text.

Containment Hierarchy

Contained by: <actionbar>, <actionbarstyle>, <block>, <bordercaption>, <button>, <column>, <columnheader>, <embeddedcontrol>, <embeddedfolderpane>, <embeddeddatepicker>, <parstyle>, <run>, <sectiontitle>, <sparefont>, <sublevel>, <tablerowstyle>, <title>, <toplevel>

Syntax

<!ELEMENT font EMPTY>

Attributes

<!ATTLIST font

name

%string;

#IMPLIED

color

%color;

#IMPLIED

size

%length;

#IMPLIED

style

NMTOKENS

#IMPLIED

pitch

(%font.pitches;)

#IMPLIED

truetype

%boolean;

#IMPLIED

familyid

%hex;

#IMPLIED

>

color

Color of the font.

familyid

Hexadecimal number identifying the family of a font as specified by the operating system header files. Some examples of family ids in DXL are:

Hexadecimal family id

Font family

10

Roman

20

Swiss

30

Modern

40

Script

50

Decorative

The family id can usually be deduced from the font name on import, but specify it if you want to guarantee that a specific font is retained in round-trip conversions.

name

Name of the font. See the %font.names; entity for some font names that can be used in addition to a specific font name.

pitch

Pitch is the number of characters printed per inch. The options for pitch settings in DXL are defined in the %font.pitches; entity. The pitch can usually be deduced from the font name on import, but specify it if you want to guarantee that a specific font is retained in round-trip conversions.

size

Size of the font, in points.

style

A list of tokens taken from the %font.styles; entity.

truetype

Boolean. If true, indicates that the font is a TrueType font, which is an outline font standard that differs from PostScript, which is a page description language. You can usually determine whether or not a font is TrueType from the font name on import, but specify it if you want to guarantee to retain a specific font type in round-trip conversions.

Defined entities for <font> element

The %font.names; entity lists the names that can be used in the font name attribute in addition to the specific font names, such as Courier New.

Syntax:

<!ENTITY % font.names "monospace |  multilingual | sans-serif | serif | user-interface">

The %font.pitches; entity defines the types of font pitches you can specify in DXL.

Syntax:

<!ENTITY % font.pitches "fixed | variable">

fixed

Indicates that the number of characters that print per inch is fixed. For example, a common pitch value is Courier 12, which is a 10 point font that prints at exactly 12 characters per inch.

variable

Indicates that the number of characters that print per inch can change.

The %font.styles; entity lists the style options for font.

Syntax:

<!ENTITY % font.styles "normal | bold | italic | underline | strikethrough | superscript | subscript | shadow | emboss | extrude">

bold

Applies thicker ink to the text, making it stand out from the surrounding text.

emboss

Adds a slight shadow to the entered text, creating a raised effect.

extrude

Stretches the spacing of the text horizontally.

italic

Applies an angle to the text.

normal

Applies no special styling to the text. This option is the default and can be selected to remove other style settings from text.

shadow

Drops a copy of the text in a lighter shade behind the entered text, creating a shadow effect.

strikethrough

Overwrites the text character with a dash mark. Text appears to be crossed out.

subscript

Minimizes the font and displaces the text so that it displays below the standard text line. This font style is often used for footnote symbols.

superscript

Minimizes the font and displaces the text so that it displays higher than the standard text line. This font style is often used for trademark symbols.

Usage

In DXL, the <font> element is not a container like it is in HTML. It is associated with other content by being a child of a container. For example, to make a run of text red:

<run> <font color='red' />

This is red text.

</run>

Example

Example