add_font_resource


template <class character>
int add_font_resource(const character* filename)

This function template adds a font resource to the system font table.

Parameters

const character* filename

A pointer to a string naming a font file. The filename may possess any of the following extensions.

Extension Description
.FON Font resource file.
.FNT Raw bitmap font file.
.TTF Raw true type file.
.FOT true type resource file.

Return

int

Zero The function failed.
Other The number of fonts that were added.

Notes

applications that add or remove fonts from the system font table should notify other windows of the change by sending the font change message to all top-level windows. This may be done by calling the function send_message with window handle system_window::broadcast.

A font resource loaded through this function may be removed by calling the function remove_font_resource.