user-0 提问: bin文件的字库怎么用

回复:
user: user-0
content: 引用 3 楼 zhao4zhong1 的回复: 引用 4 楼 sholber 的回复: 引用 2 楼 turingo 的回复:  我周末问的问题，没人答，想不到一上班大家都活跃起来了，多谢各位指教，祝每个人生活都愉快^_^,赵老师和图灵解决了我的疑惑

user: user-1
content: 所谓字库就是字符点阵的集合，你需要知道BIN的格式定义，然后自己查找字符画点即可。 参考我的博文http://blog.csdn.net/turingo/article/details/8191712加深概念。

user: user-2
content: 你没觉出我是在假借喊冤，实际卖老吗？

user: user-3
content: 引用 6 楼 zhao4zhong1 的回复:[quote=引用 4 楼 sholber 的回复:] 赵老师从网上搜完代码，也不看一看，心急火燎上网来贴了，都是抢分闹的。于是出现一个void main () 这个真是本ID在BC++3.1下于94-06-25 14:34:00写的。  ARJ 2.61 BETA SHAREWARE Copyright (c) 1990-98 ARJ Software, Inc. Aug 02 1998 *** This SHAREWARE program is NOT REGISTERED for use in a business, commercial, *** government, or institutional environment except for evaluation purposes.  Processing archive: C.ARJ Archive created: 1996-06-20 19:43:22, modified: 2002-04-12 17:35:02 Filename       Original Compressed Ratio DateTime modified CRC-32   AttrBTPMGVX ------------ ---------- ---------- ----- ----------------- -------- ----------- 16X16.C            2023        817 0.404 94-06-25 14:34:00 99E3D64F A--W B 1G ------------ ---------- ---------- -----     1 files        2023        817 0.404[/quote]  赵老湿也是醉了……不过是开个玩笑，居然也当真了。大家上网来，放轻松嘛。

user: user-2
content: 引用 4 楼 sholber 的回复:赵老师从网上搜完代码，也不看一看，心急火燎上网来贴了，都是抢分闹的。于是出现一个void main () 这个真是本ID在BC++3.1下于94-06-25 14:34:00写的。  ARJ 2.61 BETA SHAREWARE Copyright (c) 1990-98 ARJ Software, Inc. Aug 02 1998 *** This SHAREWARE program is NOT REGISTERED for use in a business, commercial, *** government, or institutional environment except for evaluation purposes.  Processing archive: C.ARJ Archive created: 1996-06-20 19:43:22, modified: 2002-04-12 17:35:02 Filename       Original Compressed Ratio DateTime modified CRC-32   AttrBTPMGVX ------------ ---------- ---------- ----- ----------------- -------- ----------- 16X16.C            2023        817 0.404 94-06-25 14:34:00 99E3D64F A--W B 1G ------------ ---------- ---------- -----     1 files        2023        817 0.404

user: user-3
content: 赵老湿长年活跃在CSDN，实在是不容易。

user: user-3
content: 赵老师从网上搜完代码，也不看一看，心急火燎上网来贴了，都是抢分闹的。于是出现一个void main ()

user: user-2
content: 仅供参考：使用UCDOS的点阵字库HZK16和ASC16 #include <mem.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> #include <graphics.h> const unsigned char bit[8]={128,64,32,16,8,4,2,1}; //-------------------------------------------------------- void dis(xoff,code)     unsigned int xoff,code; {     unsigned char *buffer;     FILE *hzk;     unsigned long offset;     unsigned int q,w;     int x,y,width;      buffer=calloc(32,1);     if ((code&0xFF00)!=0) {         w=(code&0x00FF)-0xA1;         q=((code>>8)&0x00FF)-0xA1;         offset=q*0x5E+w;         offset*=32;         if ((hzk=fopen("HZK16","rb"))==NULL) {             closegraph();             printf("Can not open HZK16\r\n");             exit(1);         }         fseek(hzk,offset,SEEK_SET);         fread(buffer,1,32,hzk);         fclose(hzk);         width=2;     }     else {         if ((hzk=fopen("ASC16","rb"))==NULL) {             closegraph();             printf("Can not open ASC16\r\n");             exit(1);         }         offset=code*16;         fseek(hzk,offset,SEEK_SET);         fread(buffer,1,16,hzk);         fclose(hzk);         width=1;     }     for (y=0;y<16;y++) for (x=0;x<8*width;x++) {         if (buffer[y*width+x/8]&bit[x%8]) putpixel(xoff+x,y,15);     }     free(buffer); } //-------------------------------------------------------- void display(p)     unsigned char *p; {    int i;   unsigned int qw;    i=0;   while (1) {     if (p[i]==0x0D||p[i]==0x1A) break; 	if (p[i]>0xA0) { 		qw=((unsigned int)p[i]<<8)|((unsigned int)p[i+1]&0x00FF); 		dis(8*i,qw); 		i+=2; 	} 	else { 		qw=(unsigned int)p[i]&0x00FF; 		dis(8*i,qw); 		i++; 	}   }  } //-------------------------------------------------------- void main() { 	int gdriver = DETECT, gmode, errorcode; 	long fl; 	FILE *hz; 	unsigned char *p;  	initgraph(&gdriver, &gmode, "c:\\borlandc\\bgi"); 	errorcode = graphresult(); 	if (errorcode != grOk) { 	   printf("Graphics error: %s\n", grapherrormsg(errorcode)); 	   exit(1); 	} 	hz=fopen("hz","rb"); 	fseek(hz,0,SEEK_END); 	fl=ftell(hz); 	p=calloc((int)fl,sizeof(unsigned char)); 	rewind(hz); 	fread(p,1,(int)fl,hz); 	fclose(hz); 	display(p); 	free(p); 	getch(); 	closegraph(); }

user: user-4
content: 哥整过这个，先将汉字转换为对应的GB2312或者Unicode，建立跟BIN文件的对应关系，就可以在LCD显示了