GrCreateFont()

Name

GrCreateFont() -- Create a font

Synopsis

GR_FONT_ID GrCreateFont ( GR_CHAR * name , GR_COORD height , GR_LOGFONT * plogfont );

Description

This function finds the closest available font to the the parameters specified. If plogfont is not NULL then the parameters specified in the GR_LOGFONT structure that plogfont points to are used to choose the font. Otherwise, if the height parameter is non-zero, then the builtin font closest in height to the specified height will be used. Otherwise, the builtin font with a name that matches the name, will be chosen. As a lst resort, if none of the previous criteria finds a match, the first builtin font will be returned.

Parameters

TypeNameDescription
GR_CHAR*nameASCII string containing the face name of the desired font. The table below lists the face names of the builtin fonts.
GR_COORDheightThe desired font height.
GR_LOGFONT*plogfontA pointer to a GR_LOGFONT structure.

Built in font face names for the name field.

GR_FONT_SYSTEM_VARGR_FONT_OEM_FIXED
GR_FONT_GUI_VARGR_FONT_SYSTEM_FIXED

Returns

The ID of the newly created font. This ID must be used in subsequent font functions.

See Also

GrDestroyFont(), GrSetGCFont(), GrSetFontSize(), GrSetFontRotation(), GrSetFontAttr(), GrGetFontInfo().