blob: 9d721fda282c1f1b498895fd0a5d36bfff408cf3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
/*
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.x = width;
}
void Font::set_height(const float height)
{
font_size.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);
}
}
|