struct //汉字可以随便加
{
uchar index[2];
uchar msk[32];
}
code hzdate[6] = {
"新",
0x20,0x24,0x2C,0x35,0xE6,0x34,0x2C,0x24,0x00,0xFC,0x24,0x24,0xE2,0x22,0x22,0x00,
0x21,0x11,0x4D,0x81,0x7F,0x05,0x59,0x21,0x18,0x07,0x00,0x00,0xFF,0x00,0x00,0x00,
"乡", 0x00,0x00,0x00,0x20,0x30,0x28,0xAC,0xA7,0x62,0x20,0x30,0x1C,0xC8,0x80,0x00,0x00,
0x00,0x40,0x40,0x42,0x47,0x23,0x22,0x22,0x12,0x11,0x09,0x07,0x01,0x00,0x00,0x00,
"安", 0x80,0x90,0x8C,0x84,0x84,0xF4,0xA5,0x86,0x84,0x84,0x84,0x84,0x94,0x8C,0x84,0x00,
0x80,0x80,0x80,0x40,0x47,0x28,0x28,0x10,0x28,0x24,0x43,0xC0,0x40,0x00,0x00,0x00,
"科", 0x10,0x12,0x92,0x72,0xFE,0x51,0x91,0x00,0x22,0xCC,0x00,0x00,0xFF,0x00,0x00,0x00,
0x04,0x02,0x01,0x00,0xFF,0x00,0x04,0x04,0x04,0x02,0x02,0x02,0xFF,0x01,0x01,0x00,
"电", 0x00,0x00,0xF8,0x48,0x48,0x48,0x48,0xFF,0x48,0x48,0x48,0x48,0xF8,0x00,0x00,0x00,
0x00,0x00,0x0F,0x04,0x04,0x04,0x04,0x3F,0x44,0x44,0x44,0x44,0x4F,0x40,0x70,0x00,
"子", 0x00,0x00,0x02,0x02,0x02,0x02,0x02,0xE2,0x12,0x0A,0x06,0x02,0x00,0x80,0x00,0x00,
0x01,0x01,0x01,0x01,0x01,0x41,0x81,0x7F,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,
};
/**********************字形码位置检索************************/
uint hz(uint v)
{ uchar k;
uint c;
for(k=0;k<6;k++)
{
c=hzdate[k].index[0]<<8|hzdate[k].index[1];
if(v==c) return (k);
}
}
|