19 return get_ptr()->ns_has_font(filename);
41 return get_ptr()->ns_load_font(filename);
50 get_ptr()->ns_add_font(filename, font);
61 get_ptr()->ns_release_font(filename);
69 get_ptr()->ns_release_all_fonts();
79 return get_ptr()->ns_garbage_collect();
87 get_ptr()->ns_list_contents(out);
static bool verify_font(const std::string &filename)
Loads the given filename up into a font, if it has not already been loaded, and returns true to indic...
static void add_font(const std::string &filename, TextFont *font)
Adds the indicated already-loaded font to the pool.
static bool has_font(const std::string &filename)
Returns true if the font has ever been loaded, false otherwise.
static void list_contents(std::ostream &out)
Lists the contents of the font pool to the indicated output stream.
static int garbage_collect()
Releases only those fonts in the pool that have a reference count of exactly 1; i....
static void release_font(const std::string &filename)
Removes the indicated font from the pool, indicating it will never be loaded again; the font may then...
An encapsulation of a font; i.e.
static void release_all_fonts()
Releases all fonts in the pool and restores the pool to the empty state.
static TextFont * load_font(const std::string &filename)
Loads the given filename up into a font, if it has not already been loaded, and returns the new font.