Font: rename Driver stuff to Engine and move subdirectory
This commit is contained in:
parent
8b96338e24
commit
5c4eea4ae1
11 changed files with 57 additions and 57 deletions
|
|
@ -5,27 +5,27 @@
|
|||
#include <Spectre/Graphics/Image.h>
|
||||
#include <Spectre/Graphics/Texture.h>
|
||||
#include <Spectre/Math/Math.h>
|
||||
#include "Font/FreeTypeDriver.h"
|
||||
#include "Font/Engine/FreeTypeEngine.h"
|
||||
|
||||
namespace sp {
|
||||
|
||||
Font::Font() :
|
||||
m_driver (new FreeTypeDriver())
|
||||
m_engine (new FreeTypeEngine())
|
||||
{
|
||||
}
|
||||
|
||||
Font::~Font()
|
||||
{
|
||||
delete m_driver;
|
||||
delete m_engine;
|
||||
}
|
||||
|
||||
bool Font::loadFromFile(const std::string& filename)
|
||||
{
|
||||
if (!m_driver->loadFromFile(filename)) {
|
||||
if (!m_engine->loadFromFile(filename)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_driver->setCharacterSize(22)) {
|
||||
if (!m_engine->setCharacterSize(22)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -56,11 +56,11 @@ void Font::loadChar(unsigned char code) const
|
|||
Image img;
|
||||
Font::Glyph glyph;
|
||||
|
||||
if (!m_driver) {
|
||||
if (!m_engine) {
|
||||
return;
|
||||
}
|
||||
|
||||
glyph = m_driver->loadGlyph(code, img);
|
||||
glyph = m_engine->loadGlyph(code, img);
|
||||
|
||||
if (glyph.size > vec2b(0, 0)) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue