FONT #nbr [, scale [, reverse ]]
Selects a font for the video output. ‘nbr’ is the font number in the range of 1 to 10, the # symbol is optional.
‘scale’ is the multiply factor in the range of 1 to 8 (eg, a scale of 2 will double the size of a pixel in both the vertical and horizontal). Default is 1.
If ‘reverse’ is a number other than zero the font will be displayed in reverse video. Default is no reverse.
There are three fonts built into MMBasic:
#1 is the standard font of 10 x 5 pixels containing the full ASCII set.
#2 is a larger font of 16 x 11 pixels also with the full ASCII set.
#3 is a jumbo font of 30 x 22 pixels consisting of the numbers zero to nine and the characters plus, minus, comma and full stop.
Examples:
FONT #3, 2, 1 ‘ double scale and reverse video
FONT #2 ‘ just select font #2
Font #1 with a scale of one and no reverse is the default on power up and will be reinstated whenever control returns to the input prompt.
Other fonts can be loaded into memory, see the FONT LOAD command.
Code for font example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
COLOR 0, 7 CLS FONT #1 PRINT "CGMMSTICK" FONT #1, 2 PRINT CLR$(BLUE, WHITE) "CGMMSTICK" FONT #1, 3, 1 PRINT "CGMMSTICK" FONT #2 PRINT "CGCOLORMAX" FONT #2, 2 PRINT CLR$(BLACK, RED) "CGCOLORMAX" FONT #2, 3, 1 PRINT "CGCOLORMAX" FONT #3, 1 PRINT "123" FONT #3, 1 PRINT CLR$(RED, YELLOW) "123" FONT #3, 2, 1 PRINT "123" |
See also:
FONT LOAD/UNLOAD
Leave a Reply