Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 23, 2006, 8:34:56 PM (19 years ago)
Author:
bensch
Message:

orxonox/font: ok, the font is rendering again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/fontdata/src/lib/graphics/text_engine/font.cc

    r8755 r8756  
    5050
    5151  assert(data.get() != NULL);
    52   this->data->renderSize = renderSize;
     52
    5353  this->setStyle("c");
    5454
    5555  if (!fontFile.empty())
    56     this->loadFontFromTTF(fontFile);
     56    this->loadFontFromTTF(fontFile, renderSize);
    5757}
    5858
     
    150150 * @returns true if loaded, false if something went wrong, or if a font was loaded before.
    151151 */
    152 bool Font::loadFontFromTTF(const std::string& fontFile)
     152bool Font::loadFontFromTTF(const std::string& fontFile, unsigned int renderSize)
    153153{
    154154  this->data = FontDataPointer (new FontData());
    155155
    156156  this->setName(fontFile);
    157   this->data->fontTTF = TTF_OpenFont(this->getName(), this->data->renderSize);
     157  this->data->fontTTF = TTF_OpenFont(fontFile.c_str(), renderSize);
    158158
    159159  if(this->data->fontTTF != NULL)
Note: See TracChangeset for help on using the changeset viewer.