Contents - Index - Previous - Next


FontName property




Declaration
property FontName: WideString;

Description

Specifies the font face of the selected text.

The property is only applicable if the selection contains text. It returns the font face for the selection as established by a <FONT> element or by the FONT-FAMILY style attribute. If the text has not been formatted with a specific font face, the property returns the default font face name for the selected element. If the property cannot return a single font face name (for example, if the selection contains text with different font faces), the property returns the empty string ('').

Writing the property adds a <FONT> element around the selection if one is not already there. Within the <FONT> element, it adds or changes the FACE attribute.

If nothing is selected but the insertion point is within a word, the property treats the current word as the selection.

Run-time only