Changeset 8756 in orxonox.OLD for branches/fontdata/src/lib
- Timestamp:
- Jun 23, 2006, 8:34:56 PM (19 years ago)
- Location:
- branches/fontdata/src/lib/graphics/text_engine
- Files:
-
- 4 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) -
branches/fontdata/src/lib/graphics/text_engine/font.h
r8755 r8756 32 32 33 33 /// LOADING new Fonts 34 bool loadFontFromTTF(const std::string& fontFile );34 bool loadFontFromTTF(const std::string& fontFile, unsigned int renderSize); 35 35 bool loadFontFromSDL_Surface(SDL_Surface* surface); 36 36 -
branches/fontdata/src/lib/graphics/text_engine/font_data.cc
r8751 r8756 30 30 this->fontTTF = NULL; 31 31 this->glyphArray = NULL; 32 this->renderStyle = TTF_STYLE_NORMAL; 33 this->renderSize = FONT_DEFAULT_RENDER_SIZE; 32 34 } 33 35 -
branches/fontdata/src/lib/graphics/text_engine/text.cc
r8755 r8756 179 179 if (newFont == NULL) 180 180 { 181 // newFont = Font::getDefaultFont();181 // newFont = &Font::(); 182 182 PRINTF(2)("Font %s could not be loaded, probably file not found\n", fontFile.c_str()); 183 183 } … … 188 188 189 189 // unloading the Font if we alrady have one loaded. 190 190 191 this->_font = *newFont; 191 192 // if (oldFont != NULL && oldFont != Font::getDefaultFont())
Note: See TracChangeset
for help on using the changeset viewer.