soui
5.0.0.1
Soui5 Doc
Loading...
Searching...
No Matches
SFontInfo.h
1
#ifndef __SFONTINFO__H__
2
#define __SFONTINFO__H__
3
4
SNSBEGIN
5
6
/**
7
* @union FONTSTYLE
8
* @brief Font style union
9
*
10
* Describes the style of a font using a union of a 64-bit integer and a bitfield structure.
11
*/
12
union
FONTSTYLE
{
13
uint64_t syle;
// DWORD version of the style
14
15
/**
16
* @struct attr
17
* @brief Bitfield structure for font style attributes
18
*/
19
struct
20
{
21
uint64_t
byCharset
: 8;
/**< Character set */
22
uint64_t
byWeight
: 8;
/**< Weight/4 */
23
uint64_t
fItalic
: 1;
/**< Italic flag */
24
uint64_t
fUnderline
: 1;
/**< Underline flag */
25
uint64_t
fBold
: 1;
/**< Bold flag */
26
uint64_t
fStrike
: 1;
/**< Strike-through flag */
27
uint64_t
fEscapement
: 12;
/**< Angle, in 0.1 degree units */
28
uint64_t
reserved
: 13;
/**< Reserved */
29
uint64_t
szIsAdding
: 1;
/**< cSize is adding */
30
uint64_t
szUnit
: 2;
/**< cSize unit (0-3) */
31
uint64_t
nSize
: 16;
/**< Font size, as a signed short */
32
}
attr
;
33
34
/**
35
* @brief Constructor for FONTSTYLE
36
* @param _style Initial style value (default is 0)
37
*/
38
FONTSTYLE
(uint64_t _style = 0)
39
: syle(_style)
40
{
41
}
42
};
43
44
/**
45
* @struct FontInfo
46
* @brief Font information structure
47
*
48
* Contains details about a font, including style, face name, property extensions, and scale.
49
*/
50
struct
FontInfo
51
{
52
FONTSTYLE
style
;
/**< Font style */
53
SStringW
strFaceName
;
/**< Font face name */
54
SStringW
strPropEx
;
/**< Font property extensions */
55
int
scale
;
/**< Font scale */
56
};
57
58
SNSEND
59
60
#endif
// __SFONTINFO__H__
SStringW
A class representing an ASCII string.
Definition
sstringw.h:96
FontInfo
Font information structure.
Definition
SFontInfo.h:51
FontInfo::scale
int scale
Definition
SFontInfo.h:55
FontInfo::strFaceName
SStringW strFaceName
Definition
SFontInfo.h:53
FontInfo::style
FONTSTYLE style
Definition
SFontInfo.h:52
FontInfo::strPropEx
SStringW strPropEx
Definition
SFontInfo.h:54
attr
Bitfield structure for font style attributes.
FONTSTYLE
Font style union.
Definition
SFontInfo.h:12
FONTSTYLE::fUnderline
uint64_t fUnderline
Definition
SFontInfo.h:24
FONTSTYLE::fItalic
uint64_t fItalic
Definition
SFontInfo.h:23
FONTSTYLE::fEscapement
uint64_t fEscapement
Definition
SFontInfo.h:27
FONTSTYLE::byCharset
uint64_t byCharset
Definition
SFontInfo.h:21
FONTSTYLE::fBold
uint64_t fBold
Definition
SFontInfo.h:25
FONTSTYLE::szUnit
uint64_t szUnit
Definition
SFontInfo.h:30
FONTSTYLE::fStrike
uint64_t fStrike
Definition
SFontInfo.h:26
FONTSTYLE::FONTSTYLE
FONTSTYLE(uint64_t _style=0)
Constructor for FONTSTYLE.
Definition
SFontInfo.h:38
FONTSTYLE::reserved
uint64_t reserved
Definition
SFontInfo.h:28
FONTSTYLE::byWeight
uint64_t byWeight
Definition
SFontInfo.h:22
FONTSTYLE::nSize
uint64_t nSize
Definition
SFontInfo.h:31
FONTSTYLE::szIsAdding
uint64_t szIsAdding
Definition
SFontInfo.h:29
SOUI
include
res.mgr
SFontInfo.h
Generated by
1.13.2