Table of Contents

 
RemoveFont
 

Purpose

Removes a single font from the manager

 

Protoype

void CTextMngr::RemoveFont (string str_font_id, bool b_text_remove)
 

Parameters

font_id the ID of the font object to remove
text_remove whether to remove all associated text objects (TRUE) or not (FALSE)
 

Description

This function removes a single font object from the font manager. Like RemoveAllFonts(), it calls TTF_CloseFont() in order to properly release the font object, which is stored as a pointer. You can also have the function automatically remove any text objects that are linked to the font by passing in TRUE for b_text_remove. If you decide not to remove the text objects, be careful because they will no longer display once the font is removed.

 
Use
CTextMngr text;
text.RemoveFont("my_font");
 

Prev: RemoveAllTexts