/* ui/font.cc This file is part of the Osirion project and is distributed under the terms of the GNU General Public License version 2 */ #include "ui/font.h" namespace ui { Font::Font(const char *name, const float width, const float height) { if (name) font_name.assign(name); font_size.assign(width, height); } Font::~Font() {} void Font::set_size(const float width, const float height) { font_size.assign(width, height); } void Font::set_size(const math::Vector2f &size) { font_size.assign(size); } void Font::set_width(const float width) { font_size.get_x() = width; } void Font::set_height(const float height) { font_size.get_y() = height; } void Font::set_name(const char *name) { if (name) font_name.assign(name); else font_name.clear(); } void Font::set_name(const std::string & name) { font_name.assign(name); } }