|
pfox
银牌会员
    
积分 1451
发帖 446
注册 2002-10-20
状态 离线
|
『第 16 楼』:
使用 LLM 解释/回答一下
以下是引用QB45在2003-10-14 19:13:07的发言:
pfox, 你发的字库文件我已经分析过了,源程序如下所示,实际上这不是一个16*15 的点阵字库,而是14*14的点阵字库。由于你的误导,让我走了不少弯路!不知你从那里弄来的这个字库文件!他的顺序是按偏旁部首排列的!
谢谢你。在是台湾国乔的一个字库。
The following is a quote from QB45 on 2003-10-14 19:13:07:
pfox, I have analyzed the font file you sent. The source code is as follows. Actually, this is not a 16*15 dot matrix font, but a 14*14 dot matrix font. Because of your misguidance, I took a lot of detours! I don't know where you got this font file from! Its order is arranged by radicals!
Thank you. It's a font from Taiwan Guoqiao.
|

我的下载空间 |
|
2003-10-14 00:00 |
|
|
QB45
高级用户
   
积分 677
发帖 194
注册 2003-9-13
状态 离线
|
『第 17 楼』:
使用 LLM 解释/回答一下
你发的et3中文系統的16*15(還是14*14呢?...)的点阵字库文件
我已经分析过了,源程序如下所示,实际上这不是一个16*15 的点阵字库,而是15*15的点阵字库。不知你从那里弄来的这个字库文件!字库的顺序与Pfox发的点阵字库文件一样是按偏旁部首排列的,不过Pfox发的点阵字库文件里面包含拼音、数学等特殊符号而你的这个没有!源程序与上面一个差不多,你的另外的两个字库我没有分析,估计也是差不多的,你自己把我的这个源程序改写一下分析分析试试看吧!
下面是源程序
input "请输入16*15点阵字库的完整的路径与文件名_ ",file$
OPEN file$ FOR BINARY AS #1
SCREEN 12
FOR i1 = 0 TO 30
x0 = 0
FOR i = 1 TO 42
SEEK #1, (i - 1 + i1 * 42) * 30 + 1
zimo$ = INPUT$(30, 1)
num = 1
y0 = i1 * 15
FOR y = 0 TO 14
chr1$ = MID$(zimo$, num, 1)
num = num + 1
chr2$ = MID$(zimo$, num, 1)
num = num + 1
chr3$ = chr2$ + chr1$
LINE (x0, y0 + y)-STEP(14, 0), 7, , CVI(chr3$)
NEXT y
x0 = x0 + 15
NEXT i
NEXT i1
end
The Chinese character library file of 16*15 (or 14*14...) that you sent.
I have analyzed it. The source program is as follows. Actually, this is not a 16*15 dot matrix character library, but a 15*15 dot matrix character library. I don't know where you got this character library file! The order of the character library is the same as the dot matrix character library file sent by Pfox, which is arranged according to radical-phonetic components. However, the dot matrix character library file sent by Pfox contains special symbols such as pinyin, mathematics, etc., but yours does not! The source program is similar to the above one. I haven't analyzed your other two character libraries. It is estimated that they are similar. You can rewrite my this source program and analyze it to have a try!
The following is the source program
input "Please enter the complete path and file name of the 16*15 dot matrix character library_ ",file$
OPEN file$ FOR BINARY AS #1
SCREEN 12
FOR i1 = 0 TO 30
x0 = 0
FOR i = 1 TO 42
SEEK #1, (i - 1 + i1 * 42) * 30 + 1
zimo$ = INPUT$(30, 1)
num = 1
y0 = i1 * 15
FOR y = 0 TO 14
chr1$ = MID$(zimo$, num, 1)
num = num + 1
chr2$ = MID$(zimo$, num, 1)
num = num + 1
chr3$ = chr2$ + chr1$
LINE (x0, y0 + y)-STEP(14, 0), 7, , CVI(chr3$)
NEXT y
x0 = x0 + 15
NEXT i
NEXT i1
end
|

我(QB45)的照片与简历
http://www.programfan.com/club/showbbs.asp?id=197280
|
|
2003-10-14 00:00 |
|
|
Roy
管理员
          專業島民
积分 4869
发帖 1633
注册 2002-12-10
状态 离线
|
『第 18 楼』:
使用 LLM 解释/回答一下
以下是引用QB45在2003-10-14 21:38:15的发言:
你发的et3中文系統的16*15(還是14*14呢?...)的点阵字库文件
我已经分析过了,源程序如下所示,实际上这不是一个16*15 的点阵字库,而是15*15的点阵字库。不知你从那里弄来的这个字库文件!字库的顺序与Pfox发的点阵字库文件一样是按偏旁部首排列的,不过Pfox发的点阵字库文件里面包含拼音、数学等特殊符号而你的这个没有!源程序与上面一个差不多,你的另外的两个字库我没有分析,估计也是差不多的,你自己把我的这个源程序改写一下分析分析试试看吧!
下面是源程序
input "请输入16*15点阵字库的完整的路径与文件名_ ",file$
OPEN file$ FOR BINARY AS #1
SCREEN 12
FOR i1 = 0 TO 30
x0 = 0
FOR i = 1 TO 42
SEEK #1, (i - 1 + i1 * 42) * 30 + 1
zimo$ = INPUT$(30, 1)
num = 1
y0 = i1 * 15
FOR y = 0 TO 14
chr1$ = MID$(zimo$, num, 1)
num = num + 1
chr2$ = MID$(zimo$, num, 1)
num = num + 1
chr3$ = chr2$ + chr1$
LINE (x0, y0 + y)-STEP(14, 0), 7, , CVI(chr3$)
NEXT y
x0 = x0 + 15
NEXT i
NEXT i1
end
這個是震漢的字型...好像真的是16*15呢... 
這個是錄進的16*16字型...可以用16*16.bas再顯示字形.....可是不對字... 
The following is a quote from QB45 on 2003-10-14 21:38:15:
The 16*15 (or is it 14*14?) dot matrix font file of the et3 Chinese system you sent
I have analyzed it, and the source code is as follows. Actually, this is not a 16*15 dot matrix font, but a 15*15 dot matrix font. I don't know where you got this font file from! The order of the font is the same as the dot matrix font file sent by Pfox, arranged by radical, but the dot matrix font file sent by Pfox contains special symbols such as pinyin, mathematics, etc., while yours does not! The source code is similar to the above one. I haven't analyzed your other two font files. I estimate they are similar. You can rewrite this source code of mine and analyze it by yourself!
The following is the source code
input "Please enter the complete path and file name of the 16*15 dot matrix font_ ",file$
OPEN file$ FOR BINARY AS #1
SCREEN 12
FOR i1 = 0 TO 30
x0 = 0
FOR i = 1 TO 42
SEEK #1, (i - 1 + i1 * 42) * 30 + 1
zimo$ = INPUT$(30, 1)
num = 1
y0 = i1 * 15
FOR y = 0 TO 14
chr1$ = MID$(zimo$, num, 1)
num = num + 1
chr2$ = MID$(zimo$, num, 1)
num = num + 1
chr3$ = chr2$ + chr1$
LINE (x0, y0 + y)-STEP(14, 0), 7, , CVI(chr3$)
NEXT y
x0 = x0 + 15
NEXT i
NEXT i1
end
This is Zhenhan's font... It seems really 16*15... 
This is the recorded 16*16 font... The 16*16.bas can be used to display the characters... But it doesn't match the characters... 
|

我的網站:http://mw16.2ya.com/ 我的網誌: http://scrappedblog.blogspot.com/
~
我的Winamp正在播放的歌曲:
 |
|
2003-10-15 00:00 |
|
|
QB45
高级用户
   
积分 677
发帖 194
注册 2003-9-13
状态 离线
|
『第 19 楼』:
使用 LLM 解释/回答一下
你说的:“這個是震漢的字型...好像真的是16*15呢...”
如果你用的是我上面的那个程序没作改动的话,应该是15*15的点阵而不是16*15的点阵字库,因为16*15无需单独做一个字库,除非是游戏字库!在读取16*16的点阵字库的BAS程序中改一下算法少划一条线,不就是16*15的汉字了吗?当然说说容易!但是关键是要判断那条线对汉字的影响不大,从而去掉它!可以用判断大小的方式!你试试看阿!
请问,你怎么对这个东西有兴趣阿?
You said: "This is Zhenhan's font... It seems really 16*15..."
If you are using the program I mentioned above without any changes, it should be a 15*15 dot matrix instead of a 16*15 dot matrix font, because 16*15 doesn't need to make a separate font library, unless it's a game font! In the BAS program that reads the 16*16 dot matrix font library, change the algorithm to draw one less line, and isn't it a 16*15 Chinese character? Of course, it's easier said than done! But the key is to judge that the impact of that line on the Chinese character is not significant, so as to remove it! You can use the way of judging the size! You can give it a try!
May I ask, why are you interested in this thing?
|

我(QB45)的照片与简历
http://www.programfan.com/club/showbbs.asp?id=197280
|
|
2003-10-15 00:00 |
|
|
sunny1979
初级用户
  忍者
积分 376
发帖 86
注册 2003-10-16
状态 离线
|
『第 20 楼』:
使用 LLM 解释/回答一下
支持你!写的不错。只是好象这些汉字显示复杂了点,可以直接调用字库中的字象HZK16、HZK24打印模式,好象比这简单一些!我这样认为,也许各有所见吧!
Support you! The writing is pretty good. Just it seems these Chinese characters are a bit complicated to display. You can directly call the character patterns HZK16, HZK24 printing mode in the font library, which seems simpler! I think so, maybe everyone has different opinions!
|

以C语言软件开发为主:http://sunny1979.icpcn.com |
|
2003-10-16 00:00 |
|
|
QB45
高级用户
   
积分 677
发帖 194
注册 2003-9-13
状态 离线
|
『第 21 楼』:
使用 LLM 解释/回答一下
一般在屏幕上显示汉字的时候需要汉字系统的支持,但需要自己显示汉字的时候,就需要自己读汉字字库文件,把字符点阵读出来,再用绘图的办法显示到屏幕.
在 UCDOS 的点阵字库 HZK16 中,字符点阵是按照汉字内码排列的,汉字的内码从一些图形字符开始,起始编码为 A1A1H,汉字内码第一位为区码,每区为 94 个汉字,第二位为每区内的编码,每个汉字的点阵为 16点*16点 共32字节,数据按第一行 1-8点,9-16点,第二行 1-8点,9-16点...排列,每位数据 1 为要显示点,0 为不显示点。所谓16*16,是每一个汉字在纵、横各16点的区域内显示的。不过后来又有了HZK12、HZK24,HZK32和HZK48字库及黑体、楷体和隶书字库。虽然汉字库种类繁多,但都是按照区位的顺序排列的。前一个字节为该汉字的区号,后一个字节为该字的位号。每一个区记录94个汉字,位号则为该字在该区中的位置。因此,汉字在汉字库中的具体位置计算公式为:94*(区号-1)+位号-1。减1是因为数组是以0为开始而区号位号是以1为开始的。这仅为以汉字为单位该汉字在汉字库中的位置,那么,如何得到以字节为单位得到该汉字在汉字库中的位置呢?只需乘上一个汉字字模占用的字节数即可,即:(94*(区号-1)+位号-1)*一个汉字字模占用字节数,而按每种汉字库的汉字大小不同又会得到不同的结果。以16*16点阵字库为例,计算公式则为:(94*(区号-1)+(位号-1))*32。汉字库文该从该位置起的32字节信息即记录了该字的字模信息。
了解点阵汉字及汉字库的构成原理后,显示汉字就变得简单。以16*16点阵字库为例,通常的方法是:将文件工作指针移到需要的汉字字模处、将汉字库文件读入一2*16数组再用for循环一位位地显示.
而Roy和Pfox两位网友提供的字库是不能用这个计算公式来计算的,所以显示与你期望的结果不相符,要解决这个问题,就要知道它是怎么得到要显示汉字在字库中的位置的,我想应该有一份字库索引表这样的一个文件,你们找找看!如果没有就应该找找看台湾的汉字库结构是不是有自己的排列方式!
Generally, when displaying Chinese characters on the screen, the support of a Chinese character system is required. But when you need to display Chinese characters by yourself, you need to read the Chinese character font file by yourself, read out the character dot matrix, and then use the drawing method to display it on the screen.
In the dot matrix font file HZK16 of UCDOS, the character dot matrix is arranged according to the internal code of Chinese characters. The internal code of Chinese characters starts from some graphic characters, and the starting code is A1A1H. The first digit of the internal code of a Chinese character is the area code, each area has 94 Chinese characters, and the second digit is the code within each area. The dot matrix of each Chinese character is 16 dots * 16 dots, totaling 32 bytes. The data is arranged as the first line 1-8 dots, 9-16 dots, the second line 1-8 dots, 9-16 dots... Each bit of data is 1 for the dot to be displayed, and 0 for the dot not to be displayed. The so-called 16*16 means that each Chinese character is displayed in an area of 16 dots in both vertical and horizontal directions. However, later there are also HZK12, HZK24, HZK32 and HZK48 font files and bold, regular script and official script font files. Although there are various types of Chinese character fonts, they are all arranged in the order of the area and position. The previous byte is the area code of the Chinese character, and the latter byte is the position code of the character. Each area records 94 Chinese characters, and the position code is the position of the character in the area. Therefore, the specific position formula of a Chinese character in the Chinese character font is: 94*(area code - 1) + position code - 1. The subtraction of 1 is because the array starts with 0 and the area code and position code start with 1. This is only the position of the Chinese character in the Chinese character font in units of Chinese characters. Then, how to get the position of the Chinese character in units of bytes? Just multiply by the number of bytes occupied by one Chinese character's font, that is: (94*(area code - 1) + position code - 1) * number of bytes occupied by one Chinese character's font, and different results will be obtained according to the different sizes of Chinese characters in each Chinese character font. Taking the 16*16 dot matrix font as an example, the formula is: (94*(area code - 1) + (position code - 1)) * 32. The 32-byte information starting from this position in the Chinese character font file records the font information of the character.
After understanding the composition principle of dot matrix Chinese characters and Chinese character fonts, displaying Chinese characters becomes simple. Taking the 16*16 dot matrix font as an example, the usual method is: move the file working pointer to the place of the desired Chinese character font, read the Chinese character font file into a 2*16 array, and then use a for loop to display bit by bit.
However, the font files provided by netizens Roy and Pfox cannot be calculated by this formula, so the display does not match the expected result. To solve this problem, you need to know how it gets the position of the Chinese character to be displayed in the font. I think there should be a file like a font index table. You can look for it! If not, you should see if the structure of Taiwan's Chinese character fonts has its own arrangement method!
|

我(QB45)的照片与简历
http://www.programfan.com/club/showbbs.asp?id=197280
|
|
2003-10-16 00:00 |
|
|
凌晨一点
初级用户
 
积分 255
发帖 54
注册 2003-10-24
状态 离线
|
『第 22 楼』:
使用 LLM 解释/回答一下
呵呵,早在70年代BASIC可风光呢,当时的一些小机器(非PC机,长的挺象90年代的小霸的那种)的操作系统就有用BASIC写的。许多应用程序譬如Lotus报表处理程序的“草稿”就是用它实现的。大名鼎鼎的暴雪创始人在那时就是靠BASIC给一些电脑公司写小游戏赚大学生活费的。直到现在,BASIC都是使用者最多的语言之一,没别的,就因为它简单,好上手,且功能不弱。
当然,我也不是叫你抱住它不放,我也是从QB走向C的啊,现在我有时都会用它做些小程序回味回味^_^ 我也觉得你应该去学C,玩编程的就是得拿的起放的下,说实话,当初我从B走向C都踌躇了许久呢^_^ 但现在觉得没白干。
加油吧!!
Hehe, as early as the 1970s, BASIC was very popular. At that time, some small machines (non-PC machines, looking quite like the little telex machines of the 1990s) had operating systems written in BASIC. Many application programs, such as the "draft" of Lotus spreadsheet processing programs, were implemented with it. The famous founder of Blizzard was making pocket money for college life by writing small games for some computer companies with BASIC at that time. Until now, BASIC is still one of the programming languages with the largest number of users. There's no other reason than it's simple, easy to get started with, and has considerable functionality.
Of course, I'm not telling you to stick to it. I also moved from QB to C. Now I sometimes use it to write some small programs to relive the past ^_^ I also think you should learn C. Those who play programming should be able to pick it up and put it down. To be honest, I hesitated for a long time when I moved from BASIC to C ^_^ But now I think it was worth it.
Come on!
|
|
2003-10-25 00:00 |
|
|
warm
初级用户
 
积分 175
发帖 25
注册 2003-10-23
状态 离线
|
『第 23 楼』:
使用 LLM 解释/回答一下
请问你当时为什么要从basic到c呢?是因为速度的问题吗?
May I ask why you switched from Basic to C at that time? Was it because of speed issues?
|
|
2003-10-25 00:00 |
|
|
凌晨一点
初级用户
 
积分 255
发帖 54
注册 2003-10-24
状态 离线
|
『第 24 楼』:
使用 LLM 解释/回答一下
原因比较多吧,速度是一方面,另外还有功能,灵活性等方面啦,当然,功能强是较大的咯^_^
There are many reasons. Speed is one aspect, and there are also aspects such as functions, flexibility, etc. Of course, having powerful functions is the more significant one. ^_^
|
|
2003-10-27 00:00 |
|
|
spirit
初级用户
 
积分 111
发帖 5
注册 2003-12-1
状态 离线
|
|
2004-1-8 00:00 |
|
|
qb45
高级用户
   
积分 677
发帖 194
注册 2003-9-13
状态 离线
|
『第 26 楼』:
使用 LLM 解释/回答一下
谢谢大家的鼓励和建议,我不想学C,要学就学汇编!
学C了对计算机也只是一知半解,都是用别人写好了的函数,没劲!!!!
Thanks for everyone's encouragement and suggestions. I don't want to learn C. If I learn, I'll learn assembly! Learning C only makes me have a half-baked understanding of computers. I'm just using functions written by others. It's boring!!!!!
|

我(QB45)的照片与简历
http://www.programfan.com/club/showbbs.asp?id=197280
|
|
2004-1-8 00:00 |
|
|
iceboy
银牌会员
    
积分 1681
发帖 512
注册 2003-8-2
状态 离线
|
『第 27 楼』:
使用 LLM 解释/回答一下
希望你做一个 800*600@75Hz 显示汉字 & 图片的 LIB
刷新率低, 看着实在难受。(除非是黑底白字)
Hope to make a LIB that displays Chinese characters & images at 800*600@75Hz. The refresh rate is low, it's really uncomfortable to look at. (Unless it's black background with white characters)
|

Somehow somewhere I've got to choose.
No matter if it is win or lose. |
|
2004-1-11 00:00 |
|
|
qb45
高级用户
   
积分 677
发帖 194
注册 2003-9-13
状态 离线
|
|
2004-1-12 00:00 |
|
|
pizigao
银牌会员
     三生缘里笑红尘
积分 1063
发帖 292
注册 2003-3-9
状态 离线
|
『第 29 楼』:
使用 LLM 解释/回答一下
顶啊!我也想学C语言啊
Top it's also great that I want to learn C language too
|

 |
|
2004-1-13 00:00 |
|
|