CircuitGizmos

Electronic Products for Creative Minds

  • Home
  • Gizmo Store/Products
  • Documentation/Datasheets
  • Projects/Libraries
  • GizmoBlog
  • Services/Contact
    • Design
    • Contact Gizmo!
  • Your Gizmo Cart
    • Your Account
You are here: Home / GizmoBlog / MMBasic Language / Screen and Graphics (VGA/composite) / FONT

FONT

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 Cancel reply

Your email address will not be published. Required fields are marked *

A Ton of Documentation

Open all | Close all

Projects made by Gizmo, Friends, and Members

open all | close all

Recent GizmoBlog Musings

  • Altair 8800 using a ColorMax!
  • Re-energizing the ColorMax, Pt. 3

Visit us!

  • Facebook

Electronic Products for Creative Minds

CircuitGizmos is your source for electronic products that help you create your embedded projects. Here at CircuitGizmos.com you will find a friendly store filled with creative products and all of the documentation that you need to use these gizmos.

We create devices that we believe make electronics fun, but we also know that our products are used for professional designs. For decades we have designed products for commercial, military, and medical industries. Our gizmos here are great for engineers and hobbyists alike.

Copyright © 2008+ CircuitGizmos, L.L.C. All rights reserved

Image already added

Recently Viewed Products

Copyright © 2021 · Generate Pro Theme on Genesis Framework · WordPress · Log in