Forge
Font_functions

Functions

FGAPI fg_err fg_create_font (fg_font *pFont)
 Create a Font object.
FGAPI fg_err fg_retain_font (fg_font *pOut, fg_font pIn)
 Increase reference count of the resource.
FGAPI fg_err fg_release_font (fg_font pFont)
 Destroy font object.
FGAPI fg_err fg_load_font_file (fg_font pFont, const char *const pFileFullPath)
 Load a given font file.
FGAPI fg_err fg_load_system_font (fg_font pFont, const char *const pFontName)
 Load a system font based on the name.

Detailed Description

Function Documentation

◆ fg_create_font()

FGAPI fg_err fg_create_font ( fg_font * pFont)

Create a Font object.

Parameters
[out]pFontwill point to the font object created after this function returns
Returns
fg_err error code

◆ fg_load_font_file()

FGAPI fg_err fg_load_font_file ( fg_font pFont,
const char *const pFileFullPath )

Load a given font file.

Parameters
[in]pFontis the font handle
[in]pFileFullPathTrue Type Font file path
Returns
fg_err error code

◆ fg_load_system_font()

FGAPI fg_err fg_load_system_font ( fg_font pFont,
const char *const pFontName )

Load a system font based on the name.

Parameters
[in]pFontis the font handle
[in]pFontNameTrue Type Font name
Returns
fg_err error code

◆ fg_release_font()

FGAPI fg_err fg_release_font ( fg_font pFont)

Destroy font object.

Parameters
[in]pFontis the font handle
Returns
fg_err error code

◆ fg_retain_font()

FGAPI fg_err fg_retain_font ( fg_font * pOut,
fg_font pIn )

Increase reference count of the resource.

Parameters
[out]pOutis the new handle to existing resource
[in]pInis the existing resource handle
Returns
fg_err error code