Arduboy Font 4x6
Source GitHub Source
I have created a 4 x 6 font for the Arduboy. It has the upper- and lower-case alphabet, numbers and the exclamation mark and the period. You can easily add extra characters if you like.
There is a #define that allows you to remove the lower case letters. Doing so strips out 108 bytes.
A sample program is shown below:
#include <Arduboy2.h> #include "src/fonts/Font4x6.h" Arduboy2Base arduboy; Font4x6 font4x6 = Font4x6(); void setup() { arduboy.boot(); } void loop() { if (!(arduboy.nextFrame())) return; arduboy.clear(); font4x6.setCursor(12, 12); font4x6.print(F("ABCDEFGHIJKLMNOPQRSTUVWXYZ")); font4x6.print(F("\nabcdefghijklmnopqrstuvwxyz")); font4x6.print(F("\n0123456789")); font4x6.print(F("\n!.")); arduboy.display(); }
You can also pass a line height to the constructor, as shown below:
Font4x6 font4x6 = Font4x6( 11 );
The two images below show the standard line height - 8 - and 11.
I also have a 3x5 font here. As a comparison, the fonts are compared to the default one below …