Trying to make new font

So I want to make a game that has a lot of dialogue so the standard font used for Arduboy wont cut it, so I made my own font but I have no idea how to make a header for Arduboy to use.


This is my amateur custom font.

why is your Z backwards?


The better question is how did I missed that?

I had a go at making your font into an ‘Arduboy-compatible’ byte array, but the spacing between characters is inconsistent, so it would require a lot more work ‘by hand’ than I am willing to do… I got as far as the numbers:

{0x00, 0x12, 0x1f, 0x10}, // 1
{0x00, 0x19, 0x15, 0x12}, // 2
{0x00, 0x00, 0x15, 0x1f}, // 3
{0x00, 0x07, 0x04, 0x1f}, // 4
{0x00, 0x00, 0x17, 0x0d}, // 5
{0x00, 0x1f, 0x15, 0x1d}, // 6
{0x00, 0x00, 0x01, 0x1f}, // 7
{0x00, 0x1f, 0x15, 0x1f}, // 8
{0x00, 0x07, 0x05, 0x1f}, // 9
{0x00, 0x1f, 0x11, 0x1f}  // 0


@filmote has already put in the work creating some nice small fonts - why not use those?

You could look at Arduboy-Tinyfont.

Sorry fellas, but I really don’t want to use Tinyfont, it’s a font I don’t want to use, the style of the font isn’t up my alley.

I provided a link to Tinyfont as an example because you asked how to make your font usable with an Arduboy.

Step 1:
Figure out how to change your font so that all the letters take the same amount of screenspace.
(I.e. make it monospace.)

You can have variable-width spacing (i.e. kerning),
but it would be a lot more work and (more importantly) eat a lot more progmem.

Mono spacing, eh? So something like this?

That thread didn’t really help much because it never explained how the font was made, that thread was all about code optimization which is great for future reference but I still don’t know where to begin.

That’s a start. Some of your symbols (exclamation mark, tilde?, minus) look like they’re still 1x5 instead of 3x5, but that’s fixable.

Since that font is 3x5 and @filmote’s Font3x5 is open source (BSD 3-clause),
you can use his code as a basis for writing your own code.

You’d just have to change the font data and add some lines to handle the extra characters that you want to handle.


I started going through it, and actually your font is very similar to the Font3x5 font,
so there’s only a few characters that would need changing.

(In fact I think this image is out of date. The real thing seems to be much more similar.)

Sweet! Thanks man, when I get the time I’ll definitely experiment with this font.

I actually made a start on getting it working yesterday.

I’ve converted all the letters and numbers (actually I stole the numbers from @uXe :P).
I’ve also done !, ", %, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, [, \, ], ^, _, `, {, |, }.
I’m still missing &, #, $, @, ~.

I could manage all the ones that will fit in 3x5 that you already have symbols for,
but the ones that are 4 or wider (e.g. #, @, ~) or the ones that you don’t have symbols for are going to have to be fixed, added or scrapped.

(It takes about 10-20 seconds to convert each character to image data by hand.)

P Q and R look like they need some work.

Edit: And \ renders as /

1 Like

There are two difficult problems in computer science.
Naming things, cache invalidation and off-by-one errors.

To get three off-by-one errors in a row is either bad luck or poor eyesight.
(And frankly I’d be surprised if it’s just three.)

No it doesn’t, it’s actually the input string that’s wrong.
I wrote font3x5.println(F("[/]^_`")); instead of font3x5.println(F("[\\]^_`"));

1 Like

Best I can do on my phone

1 Like

I say scrap them, I can figure out a different font another day, Q and R look funny but overall it looks good.

I’ve fixed that since then.

Try it for yourself:

Alright! …How do I use it?

I got as far as having it included in Arduino’s library but I have no idea how to use it in a code.