MyGUI 3.2.2

MyGUI_FontData.h
Go to the documentation of this file.
1 /*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7 #ifndef MYGUI_FONT_DATA_H_
8 #define MYGUI_FONT_DATA_H_
9
10 #include "MyGUI_Prerequest.h"
11
12 namespace MyGUI
13 {
14
15 namespace FontCodeType
16 {
17
18 enum Enum
19 {
20 Tab = 0x0009,
21 LF = 0x000A,
22 CR = 0x000D,
23 Space = 0x0020,
24 NEL = 0x0085,
25
26 // The following are special code points. These are used represent displayable text elements that do not correspond to
27 // any actual Unicode code point. To prevent collisions, they must be defined with values higher than that of the
28 // highest valid Unicode code point (0x10FFFF as of Unicode 6.1).
29 Selected = 0xFFFFFFFC, // Used for rendering text selections when they have input focus.
30 SelectedBack = 0xFFFFFFFD, // Used for rendering text selections when they don't have input focus.
31 Cursor = 0xFFFFFFFE, // Used for rendering the blinking text cursor.
32 NotDefined = 0xFFFFFFFF // Used to render substitute glyphs for characters that aren't supported by the current font.
33 };
34
35 }
36
37 // информация об одном символе
38 struct GlyphInfo
39 {
40 GlyphInfo(
41 Char _codePoint = 0U,
42 float _width = 0.0f,
43 float _height = 0.0f,
44 float _advance = 0.0f,
45 float _bearingX = 0.0f,
46 float _bearingY = 0.0f,
47 const FloatRect& _uvRect = FloatRect()) :
48 codePoint(_codePoint),
49 width(_width),
50 height(_height),
51 advance(_advance),
52 bearingX(_bearingX),
53 bearingY(_bearingY),
54 uvRect(_uvRect)
55 {
56 }
57
58 Char codePoint;
59 float width;
60 float height;
61 float advance;
62 float bearingX;
63 float bearingY;
64 FloatRect uvRect;
65 };
66
67 typedef std::vector<GlyphInfo> VectorGlyphInfo;
68
69 } // namespace MyGUI
70
71 #endif // MYGUI_FONT_DATA_H_
MyGUI::FontCodeType::Enum
Enum
Definition: MyGUI_FontData.h:18
MyGUI::FontCodeType::SelectedBack
Definition: MyGUI_FontData.h:30
MyGUI::GlyphInfo::advance
float advance
Definition: MyGUI_FontData.h:61
MyGUI_Prerequest.h
MyGUI::GlyphInfo::GlyphInfo
GlyphInfo(Char _codePoint=0U, float _width=0.0f, float _height=0.0f, float _advance=0.0f, float _bearingX=0.0f, float _bearingY=0.0f, const FloatRect &_uvRect=FloatRect())
Definition: MyGUI_FontData.h:40
MyGUI::GlyphInfo::bearingX
float bearingX
Definition: MyGUI_FontData.h:62
MyGUI::FontCodeType::CR
Definition: MyGUI_FontData.h:22
MyGUI::FontCodeType::NotDefined
Definition: MyGUI_FontData.h:32
MyGUI::GlyphInfo::uvRect
FloatRect uvRect
Definition: MyGUI_FontData.h:64
MyGUI
Definition: MyGUI_ActionController.h:14
MyGUI::types::TRect< float >
MyGUI::FontCodeType::Space
Definition: MyGUI_FontData.h:23
MyGUI::Char
unsigned int Char
Definition: MyGUI_Types.h:51
MyGUI::GlyphInfo::codePoint
Char codePoint
Definition: MyGUI_FontData.h:58
MyGUI::GlyphInfo::width
float width
Definition: MyGUI_FontData.h:59
MyGUI::GlyphInfo
Definition: MyGUI_FontData.h:38
MyGUI::GlyphInfo::height
float height
Definition: MyGUI_FontData.h:60
MyGUI::VectorGlyphInfo
std::vector< GlyphInfo > VectorGlyphInfo
Definition: MyGUI_FontData.h:67
MyGUI::FloatRect
types::TRect< float > FloatRect
Definition: MyGUI_Types.h:33
MyGUI::FontCodeType::Cursor
Definition: MyGUI_FontData.h:31
MyGUI::GlyphInfo::bearingY
float bearingY
Definition: MyGUI_FontData.h:63
MyGUI::FontCodeType::NEL
Definition: MyGUI_FontData.h:24
MyGUI::TabControl
TabControl properties. TabControl_skin_childs Skin childs. TabControl widget description should be h...
Definition: MyGUI_TabControl.h:26
MyGUI::FontCodeType::LF
Definition: MyGUI_FontData.h:21
MyGUI::FontCodeType::Selected
Definition: MyGUI_FontData.h:29