C4 Engine Terathon Software C4 Engine API Documentation

• Interface Manager

API Links
Developer Links

Font::Get

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

static Font *Get(const char *name);

Parameters
name The name of the font resource.
Description
The Get 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 Get function. A convenient way to accomplish this automatically is to use the AutoReleaseFont class.
See Also

AutoReleaseFont

Shared::Release