中国DOS联盟论坛

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-10-31 11:30
47,815 topics / 349,930 posts / today 0 new / 48,290 members
DOS开发编程 & 发展交流 (开发室) » Source code for displaying Chinese characters in text mode
Printable Version  2,263 / 11
Floor1 qb45 Posted 2003-10-30 00:00
高级用户 Posts 194 Credits 677
Floor2 凌晨一点 Posted 2003-10-30 00:00
初级用户 Posts 54 Credits 255
Floor3 Wengier Posted 2003-10-31 00:00
系统支持 Posts 10,521 Credits 27,736
I wonder which Chinese characters this program can display? It shouldn't be all Chinese characters, right..
Floor4 qb45 Posted 2003-10-31 00:00
高级用户 Posts 194 Credits 677
It can display all Chinese characters, but you need to make a tool yourself to extract the fonts.
You can modify the source code for displaying Chinese characters a bit so it can extract the fonts!
Just replace the data inside DATA, and it can display other Chinese characters.
But the number of Chinese characters that can be displayed on the same screen is limited, because there are only 128 extended characters!
Floor5 Wengier Posted 2003-10-31 00:00
系统支持 Posts 10,521 Credits 27,736
Then is there any ready-made compatible tool for extracting fonts?
Floor6 qb45 Posted 2003-11-03 00:00
高级用户 Posts 194 Credits 677
''Please do not enter English letters
OPEN "hzk16" FOR BINARY AS #1
input "Please enter the Chinese characters to convert = ",hz1$
hz 100, 100, hz1$, 7
PRINT "Font extraction successful ok!!!"
SUB hz (x0, y0, hz.word$, hzcol)
leng = LEN(hz.word$)
now = 1
OPEN "hz.dat" FOR OUTPUT AS #3 ''The font file is named HZ.DAT
PRINT #3, hz.word$
PRINT #3, "data";
DO
qu = ASC(MID$(hz.word$, now, 1))
now = now + 1
wei = ASC(MID$(hz.word$, now, 1))
now = now + 1
IF qu > 161 AND wei > 161 THEN
ps& = ((qu - 161) * 94& + wei - 161) * 32& + 1
SEEK #1, ps&
zimo$ = INPUT$(32, 1)
num = 1
FOR i = 1 TO 2
FOR y = 0 TO 15
chr1$ = MID$(zimo$, num, 1)
num = num + 1
chr2$ = MID$(zimo$, num, 1)
num = num + 1
chr3$ = chr2$ + chr1$
IF i = 2 THEN chr1$ = chr2$
IF y < 15 THEN PRINT #3, ASC(chr1$); ","; ELSE PRINT #3, ASC(chr1$)
'' LINE (x0, y0 + y)-STEP(15, 0), hzcol, , ASC(chr1$)
NEXT y
num = 1
x0 = x0 + 8
PRINT #3, "data";

NEXT i
END IF
LOOP UNTIL now = leng + 1

END SUB




Floor7 算了 Posted 2003-12-29 00:00
初级用户 Posts 2 Credits 109
You're using the interrupt for self-drawn fonts under DOS, right? Why do it in text mode? If you switch to graphics mode
and draw the Chinese characters on the screen, you can enlarge or shrink them and position them however you want, much more flexible.
Floor8 qb45 Posted 2003-12-30 00:00
高级用户 Posts 194 Credits 677
Because there are still some advantages in text mode! 、
I had already made Chinese character drawing several years ago, but I've only managed to do it in text mode now! Technically it's harder, it's not about the length of the code!
Floor9 spirit Posted 2004-01-08 00:00
初级用户 Posts 5 Credits 111
Floor10 jiaking Posted 2004-03-17 00:00
中级用户 Posts 52 Credits 223
When compiling it says: type not define, at DIM InRegs AS RegTypeX. Why?
Floor11 qb45 Posted 2004-03-19 00:00
高级用户 Posts 194 Credits 677
When starting QB, please use QB/L. If you want to know the details, please go to the QBASIC forum for programming enthusiasts. There are detailed posts about interrupt calls and tutorials on how to compile BAS files!
Floor12 @yingyong@ Posted 2004-03-21 00:00
初级用户 Posts 3 Credits 106
Really nice!
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023