MyGUI
3.2.1
|
00001 /* 00002 * This source file is part of MyGUI. For the latest info, see http://mygui.info/ 00003 * Distributed under the MIT License 00004 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT) 00005 */ 00006 00007 #ifndef __MYGUI_FONT_DATA_H__ 00008 #define __MYGUI_FONT_DATA_H__ 00009 00010 #include "MyGUI_Prerequest.h" 00011 00012 namespace MyGUI 00013 { 00014 00015 namespace FontCodeType 00016 { 00017 00018 enum Enum 00019 { 00020 Tab = 0x0009, 00021 LF = 0x000A, 00022 CR = 0x000D, 00023 Space = 0x0020, 00024 NEL = 0x0085, 00025 00026 // The following are special code points. These are used represent displayable text elements that do not correspond to 00027 // any actual Unicode code point. To prevent collisions, they must be defined with values higher than that of the 00028 // highest valid Unicode code point (0x10FFFF as of Unicode 6.1). 00029 Selected = 0xFFFFFFFC, // Used for rendering text selections when they have input focus. 00030 SelectedBack = 0xFFFFFFFD, // Used for rendering text selections when they don't have input focus. 00031 Cursor = 0xFFFFFFFE, // Used for rendering the blinking text cursor. 00032 NotDefined = 0xFFFFFFFF // Used to render substitute glyphs for characters that aren't supported by the current font. 00033 }; 00034 00035 } 00036 00037 // информация об одном символе 00038 struct GlyphInfo 00039 { 00040 GlyphInfo( 00041 Char _codePoint = 0U, 00042 float _width = 0.0f, 00043 float _height = 0.0f, 00044 float _advance = 0.0f, 00045 float _bearingX = 0.0f, 00046 float _bearingY = 0.0f, 00047 const FloatRect& _uvRect = FloatRect()) : 00048 codePoint(_codePoint), 00049 width(_width), 00050 height(_height), 00051 advance(_advance), 00052 bearingX(_bearingX), 00053 bearingY(_bearingY), 00054 uvRect(_uvRect) 00055 { 00056 } 00057 00058 Char codePoint; 00059 float width; 00060 float height; 00061 float advance; 00062 float bearingX; 00063 float bearingY; 00064 FloatRect uvRect; 00065 }; 00066 00067 typedef std::vector<GlyphInfo> VectorGlyphInfo; 00068 00069 } // namespace MyGUI 00070 00071 #endif // __MYGUI_FONT_DATA_H__