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  {
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 
59  float width;
60  float height;
61  float advance;
62  float bearingX;
63  float bearingY;
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::GlyphInfo::advance
float advance
Definition: MyGUI_FontData.h:61
MyGUI::FontCodeType::Selected
@ Selected
Definition: MyGUI_FontData.h:29
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::SelectedBack
@ SelectedBack
Definition: MyGUI_FontData.h:30
MyGUI::types::TRect< float >
MyGUI::FontCodeType::NotDefined
@ NotDefined
Definition: MyGUI_FontData.h:32
MyGUI::FloatRect
types::TRect< float > FloatRect
Definition: MyGUI_Types.h:33
MyGUI::FontCodeType::CR
@ CR
Definition: MyGUI_FontData.h:22
MyGUI::GlyphInfo::uvRect
FloatRect uvRect
Definition: MyGUI_FontData.h:64
MyGUI::GlyphInfo
Definition: MyGUI_FontData.h:38
MyGUI_Prerequest.h
MyGUI::FontCodeType::Space
@ Space
Definition: MyGUI_FontData.h:23
MyGUI::FontCodeType::Cursor
@ Cursor
Definition: MyGUI_FontData.h:31
MyGUI::GlyphInfo::codePoint
Char codePoint
Definition: MyGUI_FontData.h:58
MyGUI::Char
unsigned int Char
Definition: MyGUI_Types.h:51
MyGUI::GlyphInfo::height
float height
Definition: MyGUI_FontData.h:60
MyGUI::VectorGlyphInfo
std::vector< GlyphInfo > VectorGlyphInfo
Definition: MyGUI_FontData.h:67
MyGUI::GlyphInfo::bearingY
float bearingY
Definition: MyGUI_FontData.h:63
MyGUI::GlyphInfo::width
float width
Definition: MyGUI_FontData.h:59
MyGUI
Definition: MyGUI_ActionController.h:14
MyGUI::FontCodeType::NEL
@ NEL
Definition: MyGUI_FontData.h:24
MyGUI::FontCodeType::LF
@ LF
Definition: MyGUI_FontData.h:21
MyGUI::TabControl
TabControl properties. Skin childs. TabControl widget description should be here.
Definition: MyGUI_TabControl.h:26