GetFont

InstallShield 2014 » InstallScript Language Reference

The GetFont function builds a font and retrieves its handle. You can use the font handle to specify the font used by the controls in a custom dialog.

Note: InstallShield deletes all fonts created with this function when the installation terminates. In addition, InstallShield releases all system resources upon termination.

Syntax

GetFont ( szFontName, nPointSize, nAttributes );

Parameters

GetFont Parameters

Parameter

Description

szFontName

Specifies the name of the font that you want to build.

nPointSize

Specifies the point size of the font that you want to build.

nAttributes

Specifies the style of the font. Pass one or more of the following predefined constants in this parameter. Specify multiple styles by combining constants with the bitwise OR operator ( | ).

STYLE_BOLD—Specifies a bold style font.
STYLE_ITALIC—Specifies that you want the font to be italicized.
STYLE_NORMAL—Specifies a normal style font.
STYLE_UNDERLINE—Specifies that you want the characters to be underlined.

Return Values

GetFont Return Values

Return Value

Description

XXXX

The handle to the font.

If GetFont cannot find the font that is named in szFontName, the function builds the Arial font and returns a handle to that font.

See Also