fix release_font issue

This commit is contained in:
David Rose 2010-05-03 03:21:22 +00:00
parent 5e09cff612
commit 62889f3fa6
2 changed files with 8 additions and 3 deletions

View File

@ -166,11 +166,16 @@ ns_add_font(const string &str, TextFont *font) {
// Description: The nonstatic implementation of release_font().
////////////////////////////////////////////////////////////////////
void FontPool::
ns_release_font(const string &filename) {
ns_release_font(const string &str) {
LightMutexHolder holder(_lock);
string index_str;
Filename filename;
int face_index;
lookup_filename(str, index_str, filename, face_index);
Fonts::iterator ti;
ti = _fonts.find(filename);
ti = _fonts.find(index_str);
if (ti != _fonts.end()) {
_fonts.erase(ti);
}

View File

@ -54,7 +54,7 @@ private:
bool ns_has_font(const string &str);
TextFont *ns_load_font(const string &str);
void ns_add_font(const string &str, TextFont *font);
void ns_release_font(const string &filename);
void ns_release_font(const string &str);
void ns_release_all_fonts();
int ns_garbage_collect();
void ns_list_contents(ostream &out) const;