soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
SFontInfo.h
1#ifndef __SFONTINFO__H__
2#define __SFONTINFO__H__
3
4SNSBEGIN
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 */
12union 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 */
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
58SNSEND
59
60#endif // __SFONTINFO__H__
A class representing an ASCII string.
Definition sstringw.h:96
Font information structure.
Definition SFontInfo.h:51
int scale
Definition SFontInfo.h:55
SStringW strFaceName
Definition SFontInfo.h:53
FONTSTYLE style
Definition SFontInfo.h:52
SStringW strPropEx
Definition SFontInfo.h:54
Bitfield structure for font style attributes.
Font style union.
Definition SFontInfo.h:12
uint64_t fUnderline
Definition SFontInfo.h:24
uint64_t fItalic
Definition SFontInfo.h:23
uint64_t fEscapement
Definition SFontInfo.h:27
uint64_t byCharset
Definition SFontInfo.h:21
uint64_t fBold
Definition SFontInfo.h:25
uint64_t szUnit
Definition SFontInfo.h:30
uint64_t fStrike
Definition SFontInfo.h:26
FONTSTYLE(uint64_t _style=0)
Constructor for FONTSTYLE.
Definition SFontInfo.h:38
uint64_t reserved
Definition SFontInfo.h:28
uint64_t byWeight
Definition SFontInfo.h:22
uint64_t nSize
Definition SFontInfo.h:31
uint64_t szIsAdding
Definition SFontInfo.h:29