Changeset 8753 in orxonox.OLD for branches/fontdata/src/lib/graphics/text_engine/text.cc
- Timestamp:
- Jun 23, 2006, 6:38:05 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/fontdata/src/lib/graphics/text_engine/text.cc
r8619 r8753 56 56 Text::~Text() 57 57 { 58 if (this->_font != NULL && this->_font != Font::getDefaultFont())59 ResourceManager::getInstance()->unload(this->_font); 58 /* if (this->_font != NULL && this->_font != Font::getDefaultFont()) 59 ResourceManager::getInstance()->unload(this->_font);*/ 60 60 } 61 61 … … 175 175 { 176 176 Font* newFont = NULL; 177 Font* oldFont = this->_font;177 // Font* oldFont = this->_font; 178 178 179 179 // load a new Font … … 183 183 if (newFont == NULL) 184 184 { 185 newFont = Font::getDefaultFont();185 // newFont = Font::getDefaultFont(); 186 186 PRINTF(2)("Font %s could not be loaded, probably file not found\n", fontFile.c_str()); 187 187 } 188 188 } 189 if (newFont == NULL)190 newFont = Font::getDefaultFont();189 // if (newFont == NULL) 190 // newFont = Font::getDefaultFont(); 191 191 assert(newFont != NULL); 192 192 193 193 // unloading the Font if we alrady have one loaded. 194 194 this->_font = newFont; 195 if (oldFont != NULL && oldFont != Font::getDefaultFont())196 ResourceManager::getInstance()->unload(oldFont);195 // if (oldFont != NULL && oldFont != Font::getDefaultFont()) 196 // ResourceManager::getInstance()->unload(oldFont); 197 197 198 198 this->setupTextWidth();
Note: See TracChangeset
for help on using the changeset viewer.