Cicode Programming Reference > Cicode Function Categories > Display Functions Introduction > DspFontHnd

DspFontHnd

Gets the font handle of a font that is defined in the Fonts database. You can use this font handle in the functions that display text, buttons, and text files.

Syntax

DspFontHnd(Name)

Name:

The font name in the fonts database.

Return Value

The font handle as an integer. If the font cannot be found, -1 is returned. The font handle identifies the table where the data on the associated font is stored.

Related Functions

DspFont, DspText, DspButton, DspButtonFn, DspFile

Example

Fonts

Font Name

BigFont

Font Type

Helv

Pixel Size

24

Foreground Color

Blue

Background Color

-1

Comment

Defines a font

hBigFont=DspFontHnd("BigFont");
DspText(20,hBigFont,"Text in Big Font");
/* Displays "Text in Big Font" in 24-point Helvetica font in blue on an unchanged background at AN20. */

See Also

Display Functions