[Resend] On 2004-03-05, Henrique (BuSab) wrote:
>> On DISPLAY's side there's another thing that could be done: the fonts >> can be set in a format called DR-FONTs, where they are compressed. >> However, I don't know much about this format, and I don't know if >> Henrique is able to create CPIs that have DR-FONTs instead of fonts. > > Sorry, I'm not. Well, I documented the DRFONT format in my CPI.LST file. You should already have it, but please ask, if you need a fresh copy. For those new to the list: The DRFONT format is a slight but quite useful variation of the normal FONT format introduced with DR DOS 6.0 and higher, but has the advantage that every character bitmap is only stored once in the file, not repeated for every font in the file. Since there is a 64 Kb limit in MS-DOS/PC DOS .CPI files (not in .CPI files by some MS-DOS OEM versions, in PTS-DOS or in Windows NT files), you cannot store more than some 8 codepages in a single file using the normal FONT format. However, using the DRFONT format, I estimate you could store about 100 to 150 codepages in a single file before reaching the 64 Kb limit. Of course, it depends on which codepages were included, but once you have covered the base repertoire, most other codepages are only slight variations of other codepages, so after a while only one or two extra characters will have to be added to the font base for each new codepage to be added. Since the format differences are marginal, I suggest to support DRFONT also in FreeDOS (of course, this would also have the nice sideeffect of having many new codepages available under DR-DOS at the same time ;-). Even MS-DOS/PC DOS would be able to cope with DRFONT, if an enhanced (FreeDOS) version of MODE would be used. And there is no need to give up compatibility with the old FONT format, DR DOS 6.0 and higher supports both formats as well. The main trick is to store a lookup table in the .CPI file. This constantly growing 16-bit wide table indexes into the actual font block which has all the character bitmaps for a particular resolution, it's just that it does not stop after 256 bitmaps but continues until all characters in the lookup table have found their corresponding bitmap representation. Further, the actual list of codepage entries just has 8-bit tables indexing into the lookup table. For DISPLAY.SYS, there is no difference between the two formats, as MODE expands the compressed DRFONT representation into the normal FONT representation before it sends the data to CON:. So, the in-memory representation is the same. The main problem is down to how to create/maintain the 16-bit wide lookup table and possibly how to edit the font block. Michal H. Tyc's excellent font editor seems to be a perfect tool to edit and maintain 16-bit wide font blocks. And I planned to develop the macro framework to automatically create any kind of .CPI files from assembler sources by just flipping a few conditional defines in the MAKE file - most of this is already done, I just don't have the time to convert/create the codepage tables into the required .ASM format... Hopefully soon... Anyway, no need to wait, if someone wants a fresh copy of CPI.LST (also documenting many subtle differences of other .CPI file sub-formats) I will happily provide it. Greetings, Matthias -- <mailto:[EMAIL PROTECTED]>; <mailto:[EMAIL PROTECTED]> http://www.uni-bonn.de/~uzs180/mpdokeng.html; http://mpaul.drdos.org "Programs are poems for computers." ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Freedos-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-user