![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-26 13:13 |
47,812 topics / 349,910 posts / today 0 new / 48,264 members |
| DOS汉化世界 & 中文系统 (中文化室) » How to display Chinese characters under DOS with font files |
| Printable Version 1,702 / 3 |
| Floor1 ub | Posted 2004-02-22 00:00 |
| 初级用户 Posts 12 Credits 140 | |
|
As the title says
|
|
| Floor2 Kinglion | Posted 2004-04-24 00:00 |
| 铂金会员 Posts 1,924 Credits 5,798 From 金獅電腦軟體工作室 | |
|
#include
#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define Byte unsigned char #define Word unsigned int int flag16, flag24; void out16hz(int,int,int,int,char *); void out24hz(int,int,int,int,int,int,char *); int convert(Byte ch,int n); void out16hz(int x,int y,int z,int color,char *p) { Word num, QM,WM,flag=0; int recod,i,j,k; long pointer; char Bit; flag16=open("c:\\ccdos\\hzk16", O_RDWR|O_BINARY); if(flag16==-1){ printf("cannot open hz16\n" ; exit(1);}while((num=*p++)!=0) { if(num>0xA1) if(flag==0) { QM=(num-0xA1)&0x07F; flag=1; } else { WM=(num-0xA1)&0x07F; flag=0; recod=QM*94+WM; pointer=recod*32L; lseek(flag16,pointer,SEEK_SET); read(flag16,Bit,32); for(i=0;i<16;i++) for(j=0;j<2;j++) for(k=0;k0xA1) if(flag==0) { QM=(num-15-0xA1)&0x07F; flag=1; } else { WM=(num-0xA1)&0x07F; flag=0; record=QM*94+WM; pointer=record*72L; lseek(flag24,pointer,SEEK_SET); read(flag24,Bit,72); for(i=0;i<24*m;i=i+m) for(width=0;width<m;width++) for(j=0;j<=2;j++) for(k=0;k<8;k++) if(convert(Bit,7-k)) for(height=0;height<n;height++) for(pitch=0;pitch<m;pitch++) putpixel(x+width+j*8*m+k*m+pitch,y+height+i,z); x+=24*m+n; } close(flag24); } int convert(Byte ch,int n) { return((ch>n)&0x01); } I hope everyone will criticize and correct it! |
|
| Floor3 alhan | Posted 2004-05-11 00:00 |
| 初级用户 Posts 11 Credits 125 | |
|
Hehe. There is absolutely no need for that many header files.
|
|
| Floor4 Kinglion | Posted 2004-05-11 00:00 |
| 铂金会员 Posts 1,924 Credits 5,798 From 金獅電腦軟體工作室 | |
|
This file was uploaded after I deleted other self-written functions from it; those other functions need these header files. I was just lazy and didn't delete them.
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |