Skylicht Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
Graphics2D
SpriteFrame
CFontSource.h
1
/*
2
!@
3
MIT License
4
5
Copyright (c) 2023 Skylicht Technology CO., LTD
6
7
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
8
(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
9
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
10
subject to the following conditions:
11
12
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
13
14
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
15
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
17
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
20
This file is part of the "Skylicht Engine".
21
https://github.com/skylicht-lab/skylicht-engine
22
!#
23
*/
24
25
#pragma once
26
27
#include "Serializable/CAssetResource.h"
28
29
#include "Graphics2D/Glyph/CGlyphFreetype.h"
30
#include "Graphics2D/SpriteFrame/CSpriteFont.h"
31
#include "Graphics2D/SpriteFrame/CGlyphFont.h"
32
33
namespace
Skylicht
34
{
77
class
SKYLICHT_API CFontSource :
public
CAssetResource {
78
public
:
79
enum
EFontType
80
{
81
GlyphFreeType = 0,
82
SpriteFont
83
};
84
85
public
:
86
CEnumProperty<EFontType>
FontType;
87
CFilePathProperty
Source;
88
CFloatProperty
FontSizePt;
89
90
protected
:
91
IFont
* m_font;
92
93
std::string m_path;
94
std::string m_source;
95
float
m_sizePt;
96
97
int
m_revision;
98
99
public
:
100
CFontSource();
101
102
virtual
~CFontSource();
103
104
IFont
* initFont();
105
106
inline
IFont
* getFont()
107
{
108
return
m_font;
109
}
110
111
inline
const
void
setPath(
const
char
* path)
112
{
113
m_path = path;
114
}
115
116
inline
const
char
* getPath()
117
{
118
return
m_path.
c_str
();
119
}
120
121
inline
int
getChangeRevision()
122
{
123
return
m_revision;
124
}
125
};
126
}
Skylicht::CEnumProperty
Definition
CValuePropertyTemplate.h:994
Skylicht::CFilePathProperty
Definition
CValuePropertyTemplate.h:446
Skylicht::CFloatProperty
Definition
CValuePropertyTemplate.h:197
Skylicht::IFont
Definition
IFont.h:32
irr::core::string::c_str
const T * c_str() const
Returns character string.
Definition
irrString.h:510
Skylicht
Everything in the Skylicht Engine. You can start by looking at the topics.
Definition
AudioDebugLog.h:29
Generated by
1.17.0