China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-25 03:19
中国DOS联盟论坛 » DOS汉化世界 & 中文系统 (中文化室) » How to display Chinese characters under DOS with font files View 1,604 Replies 3
Original Poster Posted 2004-02-22 00:00 ·  中国 湖北 武汉 电信
初级用户
Credits 140
Posts 12
Joined 2004-02-22 00:00
22-year member
UID 18160
Gender Male
Status Offline
As the title says
Floor 2 Posted 2004-04-24 00:00 ·  中国 辽宁 朝阳 联通
铂金会员
★★★★
痴迷DOS者
Credits 5,798
Posts 1,924
Joined 2003-06-20 00:00
23-year member
UID 5583
Gender Male
From 金獅電腦軟體工作室
Status Offline
#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!
熟能生巧,巧能生精,一艺不精,终生无成,精亦求精,始有所成,臻于完美,永无止境!
金狮電腦軟體工作室愿竭诚为您服务!
QQ群:8393170(定期清理不发言者)
个人网站:http://www.520269.cn
电子邮件:doujiehui@vip.qq.com
微信公众号: doujiehui
Floor 3 Posted 2004-05-11 00:00 ·  中国 新疆 喀什地区 电信
初级用户
Credits 125
Posts 11
Joined 2004-05-09 00:00
22-year member
UID 23971
Gender Male
Status Offline
Hehe. There is absolutely no need for that many header files.
Floor 4 Posted 2004-05-11 00:00 ·  中国 辽宁 朝阳 联通
铂金会员
★★★★
痴迷DOS者
Credits 5,798
Posts 1,924
Joined 2003-06-20 00:00
23-year member
UID 5583
Gender Male
From 金獅電腦軟體工作室
Status Offline
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.
熟能生巧,巧能生精,一艺不精,终生无成,精亦求精,始有所成,臻于完美,永无止境!
金狮電腦軟體工作室愿竭诚为您服务!
QQ群:8393170(定期清理不发言者)
个人网站:http://www.520269.cn
电子邮件:doujiehui@vip.qq.com
微信公众号: doujiehui
Forum Jump: