MyGUI
3.2.0
Main Page
Related Pages
Namespaces
Data Structures
Files
Examples
File List
Globals
MyGUIEngine
include
MyGUI_FontData.h
Go to the documentation of this file.
1
6
/*
7
This file is part of MyGUI.
8
9
MyGUI is free software: you can redistribute it and/or modify
10
it under the terms of the GNU Lesser General Public License as published by
11
the Free Software Foundation, either version 3 of the License, or
12
(at your option) any later version.
13
14
MyGUI is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
GNU Lesser General Public License for more details.
18
19
You should have received a copy of the GNU Lesser General Public License
20
along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
21
*/
22
#ifndef __MYGUI_FONT_DATA_H__
23
#define __MYGUI_FONT_DATA_H__
24
25
#include "
MyGUI_Prerequest.h
"
26
27
namespace
MyGUI
28
{
29
30
namespace
FontCodeType
31
{
32
33
enum
Enum
34
{
35
Tab
= 0x0009,
36
LF
= 0x000A,
37
CR
= 0x000D,
38
Space
= 0x0020,
39
NEL
= 0x0085,
40
41
// The following are special code points. These are used represent displayable text elements that do not correspond to
42
// any actual Unicode code point. To prevent collisions, they must be defined with values higher than that of the
43
// highest valid Unicode code point (0x10FFFF as of Unicode 6.1).
44
Selected
= 0xFFFFFFFC,
// Used for rendering text selections when they have input focus.
45
SelectedBack
= 0xFFFFFFFD,
// Used for rendering text selections when they don't have input focus.
46
Cursor
= 0xFFFFFFFE,
// Used for rendering the blinking text cursor.
47
NotDefined
= 0xFFFFFFFF
// Used to render substitute glyphs for characters that aren't supported by the current font.
48
};
49
50
}
51
52
// информация об одном символе
53
struct
GlyphInfo
54
{
55
GlyphInfo
(
56
Char
_codePoint = 0U,
57
float
_width = 0.0f,
58
float
_height = 0.0f,
59
float
_advance = 0.0f,
60
float
_bearingX = 0.0f,
61
float
_bearingY = 0.0f,
62
const
FloatRect
& _uvRect =
FloatRect
()) :
63
codePoint
(_codePoint),
64
width
(_width),
65
height
(_height),
66
advance
(_advance),
67
bearingX
(_bearingX),
68
bearingY
(_bearingY),
69
uvRect
(_uvRect)
70
{
71
}
72
73
Char
codePoint
;
74
float
width
;
75
float
height
;
76
float
advance
;
77
float
bearingX
;
78
float
bearingY
;
79
FloatRect
uvRect
;
80
};
81
82
typedef
std::vector<GlyphInfo>
VectorGlyphInfo
;
83
84
}
// namespace MyGUI
85
86
#endif // __MYGUI_FONT_DATA_H__
Generated by
1.8.4