DEFINEFONT

Compatible with:
DOS Maximite CMM MM150 MM170 MM+ MMX Picromite ArmiteL4 Armite F4 ArmiteH7 CMM2

Syntax:
DEFINEFONT #n

Description:
This will define an embedded font which can be used exactly same as the built in fonts (ie, selected using the FONT command or specified in the TEXT command).
MMBasic must execute the font in order for it to be loaded. '#n' is the font's reference number (1 to 16). 
It can be the same as an existing font (except fonts 1, 6 and 7) and in that case it will replace that font.
Each 'hex' must be exactly eight hex digits and be separated by spaces or new lines from the next. 
Multiple lines of 'hex' words can be used with the command terminated by a matching END DEFINEFONT.

The first 'word' of the font can be interpreted as
Character count, first character, character height,character width, all as HEX

In the example below
0A = 10 characters in the font
30 = chr$(48) "0" is the first character
32 = characters are 50 pixels high
20 = characters are 32 pixels wide

See LOAD FONT for information on loading fonts from a file.

 
 CLS
 TEXT MM.HRES/2,MM.VRES/2,"1984",CM,9
 
DO:LOOP UNTIL INKEY$ <> ""
 
DEFINEFONT #9 ' 7 segment number font
 0A303220
 00000000 00000000 00FEFF00 00FFFF01 80FFFF03 60FFFF01 F0FEFF0C F801001E
 F801003F F801003F F801003F F801003F F801003F F801003F F801003F F801003F
 F801003F F801003F F801003F F801003F F801003F 7800003E 18000038 08000020
 00000000 00000020 18000038 7800003E F801003F F801003F F801003F F801003F
 F801003F F801003F F801003F F801003F F801003F F801003F F801003F F801003F
 F801003F F801003F F000001E 60FEFF0C 00FFFF01 80FFFF03 00FFFF01 00FEFF00
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 60000000
 F0000000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 78000000
 18000000 08000000 00000000 00000000 18000000 78000000 F8010000 F8010000
 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
 F8010000 F8010000 F8010000 F8010000 F0000000 60000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00FEFF00 00FFFF01
 80FFFF03 60FFFF01 F0FEFF00 F8010000 F8010000 F8010000 F8010000 F8010000
 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
 F8010000 78000000 18FEFF01 88FFFF03 E0FFFF0F C0FFFF27 00FFFF39 0000003E
 0000003F 0000003F 0000003F 0000003F 0000003F 0000003F 0000003F 0000003F
 0000003F 0000003F 0000003F 0000003F 0000003F 0000003F 0000001E 00FEFF0C
 00FFFF01 80FFFF03 00FFFF01 00FEFF00 00000000 00000000 00000000 00000000
 00FEFF00 00FFFF01 80FFFF03 60FFFF01 F0FEFF00 F8010000 F8010000 F8010000
 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
 F8010000 F8010000 F8010000 78000000 18FEFF01 88FFFF03 E0FFFF0F C0FFFF07
 18FFFF01 78000000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
 F0000000 60FEFF00 00FFFF01 80FFFF03 00FFFF01 00FEFF00 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 60000000 F000000C F801001E
 F801003F F801003F F801003F F801003F F801003F F801003F F801003F F801003F
 F801003F F801003F F801003F F801003F F801003F 7800003E 18FEFF39 88FFFF23
 E0FFFF0F C0FFFF07 18FFFF01 78000000 F8010000 F8010000 F8010000 F8010000
 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
 F8010000 F8010000 F0000000 60000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00FEFF00 00FFFF01 80FFFF03 00FFFF01
 00FEFF0C 0000001E 0000003F 0000003F 0000003F 0000003F 0000003F 0000003F
 0000003F 0000003F 0000003F 0000003F 0000003F 0000003F 0000003F 0000003E
 00FEFF39 80FFFF23 E0FFFF0F C0FFFF07 18FFFF01 78000000 F8010000 F8010000
 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
 F8010000 F8010000 F8010000 F8010000 F0000000 60FEFF00 00FFFF01 80FFFF03
 00FFFF01 00FEFF00 00000000 00000000 00000000 00000000 00FEFF00 00FFFF01
 80FFFF03 00FFFF01 00FEFF0C 0000001E 0000003F 0000003F 0000003F 0000003F
 0000003F 0000003F 0000003F 0000003F 0000003F 0000003F 0000003F 0000003F
 0000003F 0000003E 00FEFF39 80FFFF23 E0FFFF0F C0FFFF27 18FFFF39 7800003E
 F801003F F801003F F801003F F801003F F801003F F801003F F801003F F801003F
 F801003F F801003F F801003F F801003F F801003F F801003F F000001E 60FEFF0C
 00FFFF01 80FFFF03 00FFFF01 00FEFF00 00000000 00000000 00000000 00000000
 00FEFF00 00FFFF01 80FFFF03 60FFFF01 F0FEFF00 F8010000 F8010000 F8010000
 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
 F8010000 F8010000 F8010000 78000000 18000000 08000000 00000000 00000000
 18000000 78000000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
 F0000000 60000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00FEFF00 00FFFF01 80FFFF03 60FFFF01 F0FEFF0C F801001E
 F801003F F801003F F801003F F801003F F801003F F801003F F801003F F801003F
 F801003F F801003F F801003F F801003F F801003F 7800003E 18FEFF39 88FFFF23
 E0FFFF0F C0FFFF27 18FFFF39 7800003E F801003F F801003F F801003F F801003F
 F801003F F801003F F801003F F801003F F801003F F801003F F801003F F801003F
 F801003F F801003F F000001E 60FEFF0C 00FFFF01 80FFFF03 00FFFF01 00FEFF00
 00000000 00000000 00000000 00000000 00FEFF00 00FFFF01 80FFFF03 60FFFF01
 F0FEFF0C F801001E F801003F F801003F F801003F F801003F F801003F F801003F
 F801003F F801003F F801003F F801003F F801003F F801003F F801003F 7800003E
 18FEFF39 88FFFF23 E0FFFF0F C0FFFF07 18FFFF01 78000000 F8010000 F8010000
 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
 F8010000 F8010000 F8010000 F8010000 F0000000 60FEFF00 00FFFF01 80FFFF03
 00FFFF01 00FEFF00 00000000 00000000 00000000
End DefineFont

Last edited: 29 September, 2020