Changeset 8756 in orxonox.OLD for branches/fontdata/src/lib/graphics/text_engine/font.cc
- Timestamp:
- Jun 23, 2006, 8:34:56 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/fontdata/src/lib/graphics/text_engine/font.cc
r8755 r8756 50 50 51 51 assert(data.get() != NULL); 52 this->data->renderSize = renderSize; 52 53 53 this->setStyle("c"); 54 54 55 55 if (!fontFile.empty()) 56 this->loadFontFromTTF(fontFile );56 this->loadFontFromTTF(fontFile, renderSize); 57 57 } 58 58 … … 150 150 * @returns true if loaded, false if something went wrong, or if a font was loaded before. 151 151 */ 152 bool Font::loadFontFromTTF(const std::string& fontFile )152 bool Font::loadFontFromTTF(const std::string& fontFile, unsigned int renderSize) 153 153 { 154 154 this->data = FontDataPointer (new FontData()); 155 155 156 156 this->setName(fontFile); 157 this->data->fontTTF = TTF_OpenFont( this->getName(), this->data->renderSize);157 this->data->fontTTF = TTF_OpenFont(fontFile.c_str(), renderSize); 158 158 159 159 if(this->data->fontTTF != NULL)
Note: See TracChangeset
for help on using the changeset viewer.