5x6 Font

0
0
Published 2023-06-12

This is a replacement for print() that draws a customizable 5x6 font. It encodes each character as one number, and then loops through each pixel checking to see if that bit is set. So it's not very fast, but is handy if you just want a quick solution for some text larger than 3x5.

Cartridge for generating and testing font:


The spritesheet and the convert() function is not needed in the release version of a cart. Paste the following snippet into your code (and optionally replace fdat with your own data):

The fdat in that snippet has lower case letters and a star character mapped to `a..`z and `*
Unlike print(), you need to specify all 4 parameters (string,x,y,col):