⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 font.h

📁 一款收款机C源代码!因为是几年前的代码了
💻 H
字号:
/*
    说明: 
        在显示的所有点阵中, 默认的字体点阵的最右边一列和最下面一行都是空的.
        但是有一些字库是没有空行的点阵, 所以它比实际上的点阵数据要少一.
*/

#ifndef FONT_H
#define FONT_H
#include 	"ver.h"

enum FONT{
    FONT_ASC_5x7 = 0,   // 5x7点阵,但是字库用的是4*6的
    FONT_ASC_6x12,  // 1: 6x12点阵
    FONT_ASC_7x9,   // 2: 7x9点阵,但是字库用的是6*8的
    FONT_ASC_9x9,   // 3: 9x9点阵,但是字库用的是8*8的
    FONT_ASC_9x11,  // 4: 9x11点阵,但是字库用的是8*10的
    FONT_ASC_9x13,  // 5: 9x13点阵,但是字库用的是8*12的
    FONT_ASC_9x14,  // 6: 9x14点阵,但是字库用的是8*13的
    FONT_ASC_9x16,  // 7: 9x16点阵,但是字库用的是8*15的
    FONT_ASC_9x17,  // 8: 9x17点阵,但是字库用的是8*16的
    FONT_ASC_12x24, // 9: 12x24点阵,采自WD1系列的打印点阵
    FONT_ASC_20x40, // 10:  20x40点阵
    FONT_ASC_24x48, // 11: 24x48点阵

    FONT_HZ_12x12,  //12:  汉字12x12点阵
    FONT_HZ_16x16,  // 汉字16x16点阵
    FONT_HZ_ASC_8x16,// 汉字中的英文字体,采用字库8*16的结构
    FONT_HZ_24x24,  // 汉字24x24点阵
    FONT_MAX        // Max font number
};

#define FONT_HOR_MAX    24      // 所有普通字体的横向最宽
#define FONT_VRT_MAX    48      // 所有普通字体的纵向最高
#define FONT_ELG_MAX    8       // 最大的放大倍数

#if MODEL_VER == ROYAL_9INCH
#define DEFAULT_FONT    FONT_ASC_9x17
#define SUBT_DFT_FONT   FONT_ASC_12x24
#else // MODEL_VER == WD3_HK
#define DEFAULT_FONT    FONT_HZ_16x16
#define SUBT_DFT_FONT   FONT_HZ_16x16
#endif
#define BTN_DFT_FONT    DEFAULT_FONT
#define BTN_HZ_DFT_FONT FONT_HZ_16x16

extern  const unsigned char acFont4x6[][6];
extern  const byte Font6x12[];
extern  const unsigned char GUI_acFont6x8[][8];
extern  const unsigned char GUI_F8x8_acFont[][8];
extern  const unsigned char acFont8x10ASCII_0020[];
extern  const unsigned char acFont8x12ASCII_0020[];
extern  const unsigned char acF8x13_ASCII_32[];
extern  const unsigned char acF8x15B_ASCII_32[];
extern  const unsigned char acFont8x16[][16];

extern  const unsigned char Symbol_Font_List_Ex[];
extern  const unsigned char acFont8x16_Ex[][16];

extern  const byte 	Font12x24[];
extern  const byte 	Font20x40[];
extern  const byte 	Font24x48[];
extern  const byte  Font_UP[];
extern  const byte  Font_DN[];

#define HZ_12   HZ_16

extern  const BYTE HZ_16[];

extern  const byte *Font_Addr[];
extern  const byte Font_Size[][5];

extern  const byte and_table[];
extern  const byte and_table2[];
extern  const byte and_table3[];
extern  const byte and_table4[];
extern  const byte or_table[];
extern  const byte Rvs_Table[];
extern  const byte Elg_2_Table[][2];
extern  const byte Elg_3_Table[][3];
extern  const byte Elg_5_Table[][5];
extern  const byte Elg_7_Table[][7];

void Get_Font_Addr(byte ch, dword *src);
byte Judge_Qu(byte qu);
byte Judge_Wei(byte wei);
word Font_Search_Offset(byte qu, byte wei);
void TFT_Font_Dot_ELg(byte *dst, byte *dot_src, word dot_inc, byte hor_elg);
#endif /* FONT_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -