C4 Engine
C4 Engine API Documentation

Font::GetFont

Defined in:  C4Slug.h
Returns a new reference to a font object.
Prototype

static Font *GetFont(const char *name);

Parameters
name The name of the font resource.
Description
The GetFont function returns a new reference to the font object specified by the name parameter. If the font resource has already been loaded, then its reference count is incremented and a pointer to the existing object is returned. If the font specified by the name parameter does not exist, then a pointer to the default font is returned.

The Shared::Release function must be called for the returned font object to balance each call to the GetFont function. A convenient way to accomplish this automatically is to use the AutoReleaseFont class.
See Also

AutoReleaseFont

Shared::Release