Changeset 5215 in orxonox.OLD for trunk/src/lib/graphics/text_engine.cc
- Timestamp:
- Sep 22, 2005, 4:02:08 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/text_engine.cc
r5208 r5215 405 405 // setting default values. 406 406 this->font = NULL; 407 this->fontFile = NULL;408 407 this->glyphArray = NULL; 409 408 this->fastTextureID = 0; … … 446 445 bool Font::loadFont(const char* fontFile) 447 446 { 448 if (!this-> fontFile)447 if (!this->getName()) 449 448 { 450 449 this->setName(fontFile); 451 this->fontFile = new char[strlen(fontFile)+1]; 452 strcpy(this->fontFile, fontFile); 453 454 this->font = TTF_OpenFont(this->fontFile, this->fontSize); 450 451 this->font = TTF_OpenFont(this->getName(), this->fontSize); 455 452 if(!this->font) 456 453 {
Note: See TracChangeset
for help on using the changeset viewer.