DOSMENU 2.0

How to use Fonts

DOSMENU uses a specific format for fonts. All fonts are stored in the "FONTS" subdirectory.

A font file is a text file with graphical instructions. The font file need to have the font-bit at the end of the file-name. The font-bit tells DOSMENU how to render the font. The font-file has 256 lines. Each line represents an ASCII character.

Example:

Font-File UNIFONT2.DMF
The 2 is the font-bit.

The character A has ASCII Code 65, so it is in line 66(!) of the font file. We will find the following text at this line:

  0000000018242442427E424242420000
        

The font-bit 2 of this font tells us now, that every line is using 2 Hexa-Decimal characters for each font-drawing-line.
This is shown here:

  00 00 00 00 18 24 24 42 42 7E 42 42 42 42 00 00
        

Now every line is drawn using bit-calculation. The maximum value for 2 Hexa-Decials is 255, but maybe this is never used by any character in this font. So DOSMENU searches the whole font file for the maximum value to show the font without gaps.

The rendering of character A is now as follows:

 +---+---++--+--+--+--+--+--+--+
 |HEX|DEC||64|32|16| 8| 4| 2| 1|
 +---+---++--+--+--+--+--+--+--+
 | 00|  0||  |  |  |  |  |  |  |
 | 00|  0||  |  |  |  |  |  |  |
 | 00|  0||  |  |  |  |  |  |  |
 | 00|  0||  |  |  |  |  |  |  |
 | 18| 24||  |  |##|##|  |  |  |
 | 24| 36||  |##|  |  |##|  |  |
 | 24| 36||  |##|  |  |##|  |  |
 | 42| 66||##|  |  |  |  |##|  |
 | 42| 66||##|  |  |  |  |##|  |
 | 7E|126||##|##|##|##|##|##|  |
 | 42| 66||##|  |  |  |  |##|  |
 | 42| 66||##|  |  |  |  |##|  |
 | 42| 66||##|  |  |  |  |##|  |
 | 42| 66||##|  |  |  |  |##|  |
 | 00|  0||  |  |  |  |  |  |  |
 | 00|  0||  |  |  |  |  |  |  |
 +---+---++--+--+--+--+--+--+--+
        

The font-bit tells DOSMENU how to decode the font-line

To show all characters of the configured font you can start DOSMENU with the command line argument "showfont". This will display all characters on the screen:


Sample output of "showfont" with Screen Mode 0 and font "doslike2"


Additional Example of a font-file with 3 font-bits:

BLCKLTR3.DMF ("Blackletter")

Line 66 (ASCII Character 65 = A) of font file:
00000000000C7D86F807807807C07C0DC1FF18E30EE0F706000000000

3 font-bits splitting:
000 000 000 00C 7D8 6F8 078 078 07C 07C 0DC 1FF 18E 30E E0F 706 000 000 000

+---+----++----+----+----+----+----+----+----+----+----+----+----+----+
|HEX| DEC||2048|1024| 512| 256| 128|  64|  32|  16|   8|   4|   2|   1|
+---+----++----+----+----+----+----+----+----+----+----+----+----+----+
|000|   0||    |    |    |    |    |    |    |    |    |    |    |    |
|000|   0||    |    |    |    |    |    |    |    |    |    |    |    |
|000|   0||    |    |    |    |    |    |    |    |    |    |    |    |
|00C|  12||    |    |    |    |    |    |    |    |####|####|    |    |
|7D8|2008||    |####|####|####|####|####|    |####|####|    |    |    |
|6F8|1784||    |####|####|    |####|####|####|####|####|    |    |    |
|078| 120||    |    |    |    |    |####|####|####|####|    |    |    |
|078| 120||    |    |    |    |    |####|####|####|####|    |    |    |
|07C| 124||    |    |    |    |    |####|####|####|####|####|    |    |
|07C| 124||    |    |    |    |    |####|####|####|####|####|    |    |
|0DC| 220||    |    |    |    |####|####|    |####|####|####|    |    |
|1FF| 511||    |    |    |####|####|####|####|####|####|####|    |    |
|18E| 398||    |    |    |####|####|    |    |    |####|####|####|    |
|30E| 782||    |    |####|####|    |    |    |    |####|####|####|    |
|E0F|3599||####|####|####|    |    |    |    |    |####|####|####|####|
|706|1798||    |####|####|####|    |    |    |    |    |####|####|    |
|000|   0||    |    |    |    |    |    |    |    |    |    |    |    |
|000|   0||    |    |    |    |    |    |    |    |    |    |    |    |
|000|   0||    |    |    |    |    |    |    |    |    |    |    |    |
+---+----++----+----+----+----+----+----+----+----+----+----+----+----+