MiniGUI creates a few system fonts to draw menu text, window caption, or other general items. MiniGUI at least creates two system fonts: one mono-space logical font for single-byte charset, and one mono-space logical font for multi-byte charset. For the multi-byte charset, the width of one multi-byte character should be equal to the width of two single-byte characters.
More...
MiniGUI creates a few system fonts to draw menu text, window caption, or other general items. MiniGUI at least creates two system fonts: one mono-space logical font for single-byte charset, and one mono-space logical font for multi-byte charset. For the multi-byte charset, the width of one multi-byte character should be equal to the width of two single-byte characters.
◆ SYSLOGFONT_CAPTION
#define SYSLOGFONT_CAPTION 3 |
◆ SYSLOGFONT_CONTROL
#define SYSLOGFONT_CONTROL 5 |
◆ SYSLOGFONT_DEFAULT
#define SYSLOGFONT_DEFAULT 0 |
◆ SYSLOGFONT_FIXED
#define SYSLOGFONT_FIXED 2 |
◆ SYSLOGFONT_MENU
#define SYSLOGFONT_MENU 4 |
◆ SYSLOGFONT_WCHAR_DEF
#define SYSLOGFONT_WCHAR_DEF 1 |
◆ GetSysCCharWidth()
int GUIAPI GetSysCCharWidth |
( |
void |
| ) |
|
Get the width of a multi-byte character of the default system font.
This function returns the width of a multi-byte character of the default system font. MiniGUI uses mono-space font as the system default font.
- Returns
- The width of multi-byte character of the default system font.
- See also
- GetSysCharHeight, GetSysCharWidth
◆ GetSysCharHeight()
int GUIAPI GetSysCharHeight |
( |
void |
| ) |
|
Get the height of a character of the default system font.
This function returns the height of a character of the system default font. MiniGUI uses mono-space font as the default system font.
Normally, the width of one multi-byte character is equal to the width of two single-byte character when using the default system font.
- Returns
- The character height of the default system font.
- See also
- GetSysCharWidth, GetSysCCharWidth
◆ GetSysCharset()
const char *GUIAPI GetSysCharset |
( |
BOOL |
wchar | ) |
|
Get the current system charset.
This function gets the current system charset and returns the charset name. By default, the system charset is ISO8859-1 (for single-byte charset) or GB2312.1980-0 (for wide charset), but you can change it by modifying MiniGUI.cfg.
- Parameters
-
wchar | Whether to retrieve the wide charset supported currently. |
- Returns
- The read-only buffer of charset name. If you pass wchar TRUE, This function may return NULL, if there is not any wide charset supported.
◆ GetSysCharWidth()
int GUIAPI GetSysCharWidth |
( |
void |
| ) |
|
Get the width of a single-byte character of the default system font.
This function returns the width of a single-byte character of the default system font. MiniGUI uses mono-space font as the default system font, but you can specify a different font to output text in windows of MiniGUI.
- Returns
- The width of single-byte character of the default system font.
- See also
- GetSysCharHeight, GetSysCCharWidth, SelectFont, CreateLogFont
◆ GetSysFontAveWidth()
int GUIAPI GetSysFontAveWidth |
( |
int |
font_id | ) |
|
Get the average width of a single-byte character of a system font.
This function returns the average width of a single-byte character of one system font.
- Parameters
-
font_id | The identifier of a system font. |
- Returns
- The average width of single-byte character of the default system font.
- See also
- GetSystemFont
◆ GetSysFontHeight()
int GUIAPI GetSysFontHeight |
( |
int |
font_id | ) |
|
Get the height of a single-byte character of a system font.
This function returns the height of a single-byte character of one system font.
- Parameters
-
font_id | The identifier of a system font. |
- Returns
- The height of single-byte character of the default system font.
- See also
- GetSystemFont
◆ GetSysFontMaxWidth()
int GUIAPI GetSysFontMaxWidth |
( |
int |
font_id | ) |
|
Get the maximal width of a single-byte character of a system font.
This function returns the maximal width of a single-byte character of one system font.
- Parameters
-
font_id | The identifier of a system font. |
- Returns
- The maximal width of single-byte character of the default system font.
- See also
- GetSystemFont
◆ GetSystemFont()
PLOGFONT GUIAPI GetSystemFont |
( |
int |
font_id | ) |
|
|
inlinestatic |
Get the system logical font through an font identifier.
This function returns the system logical font through the font identifier font_id.
- Parameters
-
font_id | The identifier of a system font, can be one of the following values:
- SYSLOGFONT_DEFAULT
The default system logical font in single-byte charset, must be rbf.
- SYSLOGFONT_WCHAR_DEF
The default system logical font in multi-byte charset, must be rbf.
- SYSLOGFONT_FIXED
The fixed space system logical font.
- SYSLOGFONT_CAPTION
The system logical font used to draw caption text.
- SYSLOGFONT_MENU
The system logical font used to draw menu items.
- SYSLOGFONT_CONTROL
The system logical font used to draw controls.
|
- Returns
- The pointer to the system logical font. NULL on error.
Definition at line 8320 of file gdi.h.