/*** * @Author: * @Date: 2023-08-09 09:07:08 * @LastEditors: xxx * @LastEditTime: 2023-08-09 09:09:32 * @Description: * 汉字字模表 汉字库: 宋体16.dot 纵向取模下高位,数据排列:从左到右从上到下 * @email: * @Copyright (c) 2023 by xxx, All Rights Reserved. */ #ifndef __FONT_HZ_H__ #define __FONT_HZ_H__ #include "lib.h" #define _HZ88_ #define _HZ816_ typedef enum { FONT_0808, FONT_0816, FONT_MAX, } font_type_e; typedef struct // 汉字字模数据结构 { uint8_t index[4]; // 汉字内码索引 uint8_t msk[32]; // 点阵码数据 } font_hz_item_t; typedef struct { font_type_e type; // 字体类型 uint16_t width, height; // 字符宽度和高度 void *data; uint16_t size; // 每个字符字节数 uint8_t offset; } font_hz_t; extern const font_hz_t *font_hz_list[FONT_MAX]; extern uint16_t font_get_hz_length(font_type_e type); extern BOOL font_get_hz(font_type_e type, char *s, font_hz_item_t *hz); #endif // __FONT_HZ_H__