Name | ACR_system_font |
Name strings | KD_ACR_system_font |
Contributors | Masahiro Suda, Acrodea |
Contacts | Acrodea |
Status | Draft |
Version | Version 1, 2011-06-14 |
Number | TBD |
Dependencies | Requires OpenKODE Core 1.0 or later. This extension is written based on the wording of the OpenKODE Core 1.0 specification. |
When this extension is present, its facilities are accessed by including its header file:
#include <KD/ACR_system_font.h>
SystemFont defines.
#define KD_SYSTEM_FONT_TYPE_SANSSERIF_ACR 0x00000000 #define KD_SYSTEM_FONT_TYPE_MONOSPACE_ACR 0x00000001 #define KD_SYSTEM_FONT_TYPE_SERIF_ACR 0x00000002 #define KD_SYSTEM_FONT_FLAG_BOLD_ACR 0x00000001 #define KD_SYSTEM_FONT_FLAG_ITALIC_ACR 0x00000002 #define KD_SYSTEM_FONT_FLAG_OVERFLOW_WRAP_ACR 0x00000004 #define KD_SYSTEM_FONT_FLAG_OVERFLOW_ELLIPSIS_ACR 0x00000008
Gets system font width and height.
KDint kdSystemFontGetTextSizeACR( | KDint32 size, |
KDint32 locale, | |
KDint32 type, | |
KDint32 flag, | |
const KDchar * utf8string, | |
KDint32 w, | |
KDint32 * result_w, | |
KDint32 * result_h) ; |
This function acquires width and height to draw by system font.
size
A font size.
locale
A local information. (Unsupported)
type
A font type.
flag
A font flag.
utf8string
A UTF-8 string to acquire.
w
A width to display. This parameter is available only for KD_SYSTEM_FONT_FLAG_OVERFLOW_WRAP_ACR and KD_SYSTEM_FONT_FLAG_OVERFLOW_ELLIPSIS_ACR.
result_w
A pointer to an area to store a width of display area.
result_h
A pointer to an area to store a height of display area.
On success, this function returns 0. On failure, it returns -1 and can get an error detail by kdGetError
.
Stores a system font image to a buffer.
KDint kdSystemFontRenderTextACR( | KDint32 size, |
KDint32 locale, | |
KDint32 type, | |
KDint32 flag, | |
const KDchar * utf8string, | |
KDint32 w, | |
KDint32 h, | |
KDint32 pitch, | |
void * buffer) ; |
This function draws system font on a specified area. It is stored by 0-255 description of 1byte-1pixel.
On success, this function returns 0. On failure, it returns -1 and can get error detail by kdGetError
.