#if USE_HORIZONTAL==1
#define MAX_CHAR_POSX 312
#define MAX_CHAR_POSY 232
#else
#define MAX_CHAR_POSX 232
#define MAX_CHAR_POSY 312
#endif
u8 temp;
u8 pos,t;
u16 x0=x;
// u16 colortemp=POINT_COLOR;
if(x>MAX_CHAR_POSX||y>MAX_CHAR_POSY)return;
//设置窗口
// num=num-' ';//得到偏移后的值
for(t=0;t<16;t=t+2)
{
temp=asc2_1616[num][pos];
for(t=0;t<8;t++)
{
if(temp&0x01)LCD_DrawPoint(x,y);
x++;
temp>>=1;
}
temp=asc2_1616[num][pos+1];
for(t=0;t<8;t++)
{
if(temp&0x01)LCD_DrawPoint(x,y);
x++;
temp>>=1;
}
x=x0;
y++;
}
}
font.h中有数组
const unsigned char asc2_1616[1][32]={
{0x00,0x00,0x18,0x00,0x98,0x3F,0x18,0x18,0x78,0x0C,0x7E,0x02,0x98,0x7F,0xBC,0x5A,0x7C,0x4A,0x1C,0x4B,0x1A,0x49,0xDA,0x44,0x78,0x66,0x18,0x63,0x98,0x31,0x00,0x00},/*"杨",0*/
}
|