#include "cFontHolder.hpp"

using TextTypeHelpers::cFontHolder;

cFontHolder::cFontHolder( TTF_Font* font, const unsigned long int size ) 
	: mp_font(font), m_size(size)
{}

cFontHolder::~cFontHolder()
{
	if (mp_font != nullptr) {
		TTF_CloseFont(mp_font);
		mp_font = nullptr;
	}
}

TTF_Font* cFontHolder::getFont() const
{
	return mp_font;
}

const unsigned long int cFontHolder::getSize() const
{
	return m_size;
}