|
|
@@ -17,7 +17,7 @@ static std::vector<Font*> __fontCache;
|
|
|
static Effect* __fontEffect = NULL;
|
|
|
|
|
|
Font::Font() :
|
|
|
- _format(BITMAP), _style(PLAIN), _size(0), _spacing(0.0f), _glyphs(NULL), _glyphCount(0), _batch(NULL), _cutoffParam(NULL)
|
|
|
+ _format(BITMAP), _style(PLAIN), _size(0), _spacing(0.0f), _glyphs(NULL), _glyphCount(0), _texture(NULL), _batch(NULL), _cutoffParam(NULL)
|
|
|
{
|
|
|
}
|
|
|
|
|
|
@@ -32,6 +32,7 @@ Font::~Font()
|
|
|
|
|
|
SAFE_DELETE(_batch);
|
|
|
SAFE_DELETE_ARRAY(_glyphs);
|
|
|
+ SAFE_RELEASE(_texture);
|
|
|
|
|
|
// Free child fonts
|
|
|
for (size_t i = 0, count = _sizes.size(); i < count; ++i)
|
|
|
@@ -146,6 +147,7 @@ Font* Font::create(const char* family, Style style, unsigned int size, Glyph* gl
|
|
|
font->_family = family;
|
|
|
font->_style = style;
|
|
|
font->_size = size;
|
|
|
+ font->_texture = texture;
|
|
|
font->_batch = batch;
|
|
|
|
|
|
// Copy the glyphs array.
|