mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
fix release_font issue
This commit is contained in:
parent
5e09cff612
commit
62889f3fa6
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user