可以用字模点阵
#include "Conio.h"
#include "graphics.h"
#define closegr closegraph
char han16S[]={
/* 以下是 '汉' 的 16点阵宋体 字模,32 byte */
0x20,0x00,0x10,0x00,0x17,0xFC,0x02,0x08,
0x82,0x08,0x49,0x10,0x49,0x10,0x11,0x10,
0x10,0xA0,0x20,0xA0,0xE0,0x40,0x20,0xA0,
0x21,0x18,0x26,0x0E,0x28,0x04,0x00,0x00,
};
void drawmat(char *mat,int matsize,int x,int y,int color)
/*依次:字模指针、点阵大小、起始坐标(x,y)、颜色*/
{int i,j,k,n;
n=(matsize-1)/8+1;
for(j=0;j<matsize;j++)
for(i=0;i<n;i++)
for(k=0;k<8;k++)
if(mat[j*n+i]&(0x80>>k)) /*测试为1的位则显示*/
putpixel(x+i*8+k,y+j,color);
}
void initgr(void)
{
int gd = DETECT, gm = 0;
registerbgidriver(EGAVGA_driver);
initgraph(&gd, &gm, "");
}
int main(void)
{
initgr(); /* BGI初始化 */
drawmat(han16S,16,50,50,14);
getch();
closegr();
return 0;
}