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 LOAD/UNLOAD

FONT LOAD/UNLOAD

FONT LOAD file$ AS #nbr

Will load the font contained in ‘file$’ and install it as font ‘nbr’ which can be any number between 3 and 10, the # symbol is optional. The font is loaded into the memory area used by arrays and strings, use the MEMORY command to check the usage of this area.

FONT UNLOAD #nbr

Removes font ‘nbr’ and free the memory used, the # symbol is optional. You cannot unload the built in fonts.

Example of using a font file to create block graphics.

Block graphic font example code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
DRIVE "B:"
FONT LOAD "parts.fnt" AS #4
FONT #4
PRINT "I"
PRINT "IAIBICIDIEIFIGIH"
PRINT "I"
FOR A = 1 to 6
  PRINT "I"
  PRINT "IAGGGGBIIAGGGGBIIAGGGGBIIAGGGGBIIAGGGGBIIAGGGGBI"
  PRINT "IEIIIIFIIEIIIIFIIEIIIIFIIEIIIIFIIEIIIIFIIEIIIIFI"
  PRINT "IEIABIFIIEIABIFIIEIABIFIIEIABIFIIEIABIFIIEIABIFI"
  PRINT "IEICDIFIIEICDIFIIEICDIFIIEICDIFIIEICDIFIIEICDIFI"
  PRINT "IEIIIIFIIEIIIIFIIEIIIIFIIEIIIIFIIEIIIIFIIEIIIIFI"
  PRINT "ICHHHHDIICHHHHDIICHHHHDIICHHHHDIICHHHHDIICHHHHDI"
  PRINT "I"
NEXT A

Font definition file “parts.fnt” for example:

 

8,8,65,73

'A

********

*****

**

**

**

*

*

*

'B

********

   *****

      **

      **

      **

       *

       *

       *

'C

*

*

*

**

**

**

*****

********

'D

       *

       *

       *

      **

      **

      **

   *****

********

'E

*

*

*

*

*

*

*

*

'F

       *

       *

       *

       *

       *

       *

       *

       *

'G

********

 

 

 

 

 

 

 

'H

 

 

 

 

 

 

 

********

'I

 

 

 

 

 

 

 

 

' End of font file

See also:

FONT

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