1.字体结构体定义:
/** The logical font structure. */
typedef struct _LOGFONT {
/** The type of the logical font. */
char type [LEN_FONT_NAME + 1];
/** The family name of the logical font. */
char family [LEN_FONT_NAME + 1];
/** The charset of the logical font. */
char charset [LEN_FONT_NAME + 1];
/** The styles of the logical font. */
DWORD style;
/** The size of the logical font. */
int size;
/** The rotation angle of the logical font. */
int rotation;
/** The scale factor of sbc device font. */
unsigned short sbc_scale;
/** The scale factor of mbc device font. */
unsigned short mbc_scale;
/** Device font in single charset set */
DEVFONT* sbc_devfont;
/** Device font in multiply charset set */
DEVFONT* mbc_devfont;
} LOGFONT;
/**
* \var typedef LOGFONT* PLOGFONT
* \brief Data type of pointer to a LOGFONT.
*/
typedef LOGFONT* PLOGFONT;
2.创建font--CreateLogFont
/**
* \fn PLOGFONT GUIAPI CreateLogFont (const char* type, \
const char* family, const char* charset, char weight, \
char slant, char flip, char other, char underline, \
char struckout, int size, int rotation)
* \brief Creates a logical font.
*
* This function creates a logical font.
*
* \param type The type of the logical font, can be one of the values:
* - FONT_TYPE_NAME_BITMAP_RAW\n
* Creates a logical font by using raw bitmap device font, i.e.
* mono-space bitmap font.
* - FONT_TYPE_NAME_BITMAP_VAR\n
* Creates a logical font by using var-width bitmap device font.
* - FONT_TYPE_NAME_SCALE_TTF\n
* Creates a logical font by using scalable TrueType device font.
* - FONT_TYPE_NAME_SCALE_T1F\n
* Creates a logical font by using scalable Adobe Type1 device font.
* - FONT_TYPE_NAME_ALL\n
* Creates a logical font by using any type device font.
* \param family The family of the logica