FormatFont

Syntax

FormatFont [.Points = number] [, .Underline = number] [, .Color = number] [, .Strikethrough = number] [, .Superscript = number] [, .Subscript = number] [, .Shadow = number] [, .Hidden = number] [, .SmallCaps = number] [, .AllCaps = number] [, .Outline = number] [, .Spacing = number] [, .Position = number or text] [, .Kerning = number] [, .KerningMin = number or text] [, .Default] [, .Tab = number] [, .Font = text] [, .Bold = number] [, .Italic = number]

Remarks

Applies character formatting to the selected text. The arguments for the FormatFont statement correspond to the options in the Font dialog box (Format menu).

Argument

Explanation

.Points

The font size, in points

.Underline

Applies a type of underlining:

0 (zero) None

1 Single

2 Words Only

3 Double

4 Dotted

.Color

Color of the text (for a list of colors, see CharColor).


Argument

Explanation

.Strikethrough

If 1, applies strikethrough formatting.

.Superscript

If 1, applies superscript formatting.

.Shadow

If 1, applies shadow formatting (Macintosh only).

.Subscript

If 1, applies subscript formatting.

.Hidden

If 1, applies hidden formatting.

.SmallCaps

If 1, applies small caps formatting.

.AllCaps

If 1, applies all caps formatting.

.Outline

If 1, applies outline formatting (Macintosh only).

.Spacing

The spacing between characters, in twips (20 twips = 1 point; 72 points = 1 inch) or a text measurement:

0 (zero) Normal

>0 Expanded by the specified distance

<0 Condensed by the specified distance

.Position

The character's position relative to the baseline, in units of 0.5 point or a text measurement:

0 (zero) Normal

>0 Raised by the specified distance

<0 Lowered by the specified distance

.Kerning

If 1, enables automatic kerning (character spacing).

.KerningMin

If .Kerning is set to 1, sets a minimum font size, in points, for automatic kerning.

.Default

Sets the character formats of the Normal style.

.Tab

Specifies which tab to select when you display the Font dialog box with a Dialog or Dialog() instruction:

0 (zero) Font tab

1 Character Spacing tab

.Font

The name of the font

.Bold

If 1, applies bold formatting.

.Italic

If 1, applies italic formatting.


Example

This example demonstrates how measurements other than twips or points may be used in FormatFont instructions by specifying a text measurement. This instruction positions the selected characters .25 centimeter above the baseline.


FormatFont .Position = ".25 cm"

See Also

AllCaps, Bold, CharColor, DoubleUnderline, EditFindFont, EditReplaceFont, Font, FontSize, FormatChangeCase, FormatDefineStyleFont, GrowFont, Hidden, Italic, Outline, ResetChar, Shadow, ShrinkFont, SmallCaps, Strikethrough, Subscript, Superscript, Underline, WordUnderline