aboutsummaryrefslogtreecommitdiff
path: root/lib/gdi/gfont.h
blob: 8816f018a90bdf27741b15461335398f9f1769d8 (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
#ifndef __lib_gdi_gfont_h
#define __lib_gdi_gfont_h

#include <lib/base/object.h>
#include <string>

/**
 * \brief A softreference to a font.
 *
 * The font is specified by a name and a size.
 * \c gFont is part of the \ref gdi.
 */
class gFont: public iObject
{
	DECLARE_REF(gFont);
public:

	std::string family;
	int pointSize;
	
	/**
	 * \brief Constructs a font with the given name and size.
	 * \param family The name of the font, for example "NimbusSansL-Regular Sans L Regular".
	 * \param pointSize the size of the font in PIXELS.
	 */
	gFont(const std::string &family, int pointSize):
			family(family), pointSize(pointSize)
	{
	}
	
	virtual ~gFont()
	{
	}
	
	gFont()
		:pointSize(0)
	{
	}
};

#endif