Minigui学习--font

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值