1
0
Fork 0

Font: moving text size from font to Text object.

This commit is contained in:
Henrik Hautakoski 2016-05-05 11:04:54 +02:00
parent c74dda1200
commit b2dbee33fb
5 changed files with 31 additions and 16 deletions

View file

@ -8,7 +8,6 @@
#include "Font/FreeTypeDriver.h"
Font::Font() :
m_size (22),
m_driver (new FreeTypeDriver())
{
}
@ -18,17 +17,16 @@ Font::~Font()
delete m_driver;
}
bool Font::loadFromFile(const std::string& filename, unsigned int size)
bool Font::loadFromFile(const std::string& filename)
{
if (!m_driver->loadFromFile(filename)) {
return false;
}
if (!m_driver->setCharacterSize(size)) {
if (!m_driver->setCharacterSize(22)) {
return false;
}
m_size = size;
m_cacheTextureA.shelf = 0;
m_cacheTextureA.texpos = vec2u(0, 0);
@ -37,7 +35,7 @@ bool Font::loadFromFile(const std::string& filename, unsigned int size)
return true;
}
bool Font::loadFromMemory(const void *data, unsigned int size)
bool Font::loadFromMemory(const void *data)
{
return false;
}