ClanLib
2.3.7
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
Sources
API
Display
Font
font_description.h
Go to the documentation of this file.
1
/*
2
** ClanLib SDK
3
** Copyright (c) 1997-2011 The ClanLib Team
4
**
5
** This software is provided 'as-is', without any express or implied
6
** warranty. In no event will the authors be held liable for any damages
7
** arising from the use of this software.
8
**
9
** Permission is granted to anyone to use this software for any purpose,
10
** including commercial applications, and to alter it and redistribute it
11
** freely, subject to the following restrictions:
12
**
13
** 1. The origin of this software must not be misrepresented; you must not
14
** claim that you wrote the original software. If you use this software
15
** in a product, an acknowledgment in the product documentation would be
16
** appreciated but is not required.
17
** 2. Altered source versions must be plainly marked as such, and must not be
18
** misrepresented as being the original software.
19
** 3. This notice may not be removed or altered from any source distribution.
20
**
21
** Note: Some of the libraries ClanLib may link to may have additional
22
** requirements or restrictions.
23
**
24
** File Author(s):
25
**
26
** Mark Page
27
** Harry Storbacka
28
*/
29
32
33
#pragma once
34
35
#include "../api_display.h"
36
#include "../../Core/Text/string_types.h"
37
#include "../../Core/System/sharedptr.h"
38
39
class
CL_DisplayWindow
;
40
class
CL_FontDescription_Impl;
41
46
class
CL_API_DISPLAY
CL_FontDescription
47
{
50
51
public
:
53
CL_FontDescription
();
54
55
virtual
~
CL_FontDescription
();
56
60
static
CL_FontDescription
create_null_object();
61
65
66
public
:
67
68
enum
Charset
69
{
70
charset_default
,
71
charset_ansi
,
72
charset_baltic
,
73
charset_chinesebig5
,
74
charset_easteurope
,
75
charset_gb2312
,
76
charset_greek
,
77
charset_hangul
,
78
charset_mac
,
79
charset_oem
,
80
charset_russian
,
81
charset_shiftjis
,
82
charset_symbol
,
83
charset_turkish
,
84
charset_vietnamese
,
85
charset_johab
,
86
charset_arabic
,
87
charset_hebrew
,
88
charset_thai
89
};
90
92
bool
is_null
()
const
{
return
!impl; }
93
95
void
throw_if_null()
const
;
96
98
const
CL_String
&get_typeface_name()
const
;
99
101
int
get_height()
const
;
102
104
int
get_average_width()
const
;
105
107
float
get_escapement()
const
;
108
110
float
get_orientation()
const
;
111
113
int
get_weight()
const
;
114
116
bool
get_italic()
const
;
117
119
bool
get_underline()
const
;
120
122
bool
get_strikeout()
const
;
123
125
bool
get_fixed_pitch()
const
;
126
128
bool
get_anti_alias()
const
;
129
131
bool
get_subpixel()
const
;
132
134
Charset get_charset()
const
;
135
137
bool
operator==
(
const
CL_FontDescription
&other)
const
;
138
142
143
public
:
145
CL_FontDescription
&operator =(
const
CL_FontDescription
©);
146
147
// \brief Copy the entire font description (not just the implementation)
148
void
clone(
const
CL_FontDescription
©);
149
151
void
set_typeface_name(
const
CL_String
&name);
152
154
void
set_height(
int
value);
155
157
void
set_average_width(
int
value);
158
160
void
set_escapement(
float
value);
161
163
void
set_orientation(
float
value);
164
166
void
set_weight(
int
value);
167
169
void
set_italic(
bool
setting =
true
);
170
172
void
set_underline(
bool
setting =
true
);
173
175
void
set_strikeout(
bool
setting =
true
);
176
178
void
set_fixed_pitch(
bool
setting =
true
);
179
181
void
set_anti_alias(
bool
setting =
true
);
182
184
void
set_subpixel(
bool
setting =
true
);
185
189
void
set_charset(Charset new_charset);
190
194
195
private
:
196
CL_SharedPtr<CL_FontDescription_Impl> impl;
198
};
199
201
Generated on Fri Jun 14 2013 13:05:45 for ClanLib by
1.8.4