MyGUI
3.2.1
Main Page
Related Pages
Namespaces
Data Structures
Files
Examples
File List
Globals
mygui
MyGUIEngine
include
MyGUI_ResourceManualFont.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_RESOURCE_MANUAL_FONT_H__
8
#define __MYGUI_RESOURCE_MANUAL_FONT_H__
9
10
#include "
MyGUI_Prerequest.h
"
11
#include "
MyGUI_ITexture.h
"
12
#include "
MyGUI_IFont.h
"
13
14
namespace
MyGUI
15
{
16
17
class
MYGUI_EXPORT
ResourceManualFont
:
18
public
IFont
19
{
20
MYGUI_RTTI_DERIVED
(
ResourceManualFont
)
21
22
public:
23
ResourceManualFont
();
24
virtual ~ResourceManualFont();
25
26
virtual
void
deserialization(xml::
ElementPtr
_node,
Version
_version);
27
28
// Returns the glyph info for the specified code point, or the glyph info for a substitute glyph if the code point does not
29
// exist in this font. Returns nullptr if the code point does not exist and there is no substitute glyph available.
30
virtual
GlyphInfo
* getGlyphInfo(
Char
_id);
31
32
virtual
ITexture
* getTextureFont();
33
34
// дефолтная высота, указанная в настройках шрифта
35
virtual
int
getDefaultHeight();
36
37
private:
38
// Loads the texture specified by mSource.
39
void
loadTexture();
40
41
// A map of code points to glyph info objects.
42
typedef std::map<
Char
,
GlyphInfo
> CharMap;
43
44
// The following variables are set directly from values specified by the user.
45
std::
string
mSource;
// Source (filename) of the font.
46
47
// The following variables are calculated automatically.
48
int
mDefaultHeight;
// The nominal height of the font in pixels.
49
GlyphInfo
* mSubstituteGlyphInfo;
// The glyph info to use as a substitute for code points that don't exist in the font.
50
MyGUI::
ITexture
* mTexture;
// The texture that contains all of the rendered glyphs in the font.
51
52
CharMap mCharMap;
// A map of code points to glyph info objects.
53
};
54
55
}
// namespace MyGUI
56
57
#endif // __MYGUI_RESOURCE_MANUAL_FONT_H__
Generated on Wed Aug 20 2014 00:03:33 for MyGUI by
1.8.3.1