#include "fbgfx.bi"

  '' The first supported character
Const FirstChar = 32
  '' Last supported character
Const LastChar = 190
  '' Number of characters total.
Const NumChar = (LastChar - FirstChar) + 1


Screenres 640, 480, 32


  '' Create a font buffer large enough to hold 96 characters, with widths of 8.
  '' Remember to make our buffer one height larger than the font itself.
Dim as FB.Image ptr myFont = ImageCreate( ( NumChar * 8 ), 8 + 1 )
  '' Our font header information.
  '' Cast to uByte ptr for safety and consistency, remember.
Dim as uByte ptr myHeader = cast(uByte ptr, myFont )

  '' Assign font buffer header.
  '' Header version
myHeader[0] = 0
  '' First supported character
myHeader[1] = FirstChar
  '' Last supported character
myHeader[2] = LastChar

  '' Assign the widths of each character in the font.
For DoVar as Integer = 0 to NumChar - 1
    '' Skip the header, if you recall
  myHeader[3 + DoVar] = 8  
Next
sleep

  '' Remember to destroy our image buffer.
ImageDestroy( myFont )