Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Here's a font loader folks can use for (some of) the sprite fonts!

A topic by axnjaxn created Dec 18, 2023 Views: 108 Replies: 4
Viewing posts 1 to 4
Submitted (3 edits) (+2)

Here’s the cart

(Updated 12/19: Fixed a bug with the spacing of ‘!’)

(Note 1/1: The filename will probably need to be renamed, itch seems to be mangling it!)

This can be modified or stripped down quite a bit, but the main takeaways are:

  • Using a stringified font produced by this cart only costs two tokens (just paste the string that running it copies to your clipboard!)
  • You can paste in your own sprite font, provided it uses color 0 for transparency; any color other than 0 is taken to be “on” because the custom fonts supported by PICO-8 are colored as usual
  • It’s configured for either variable-width or fixed-width fonts (and erases any empty space padding in the former case)
  • If you use variable width, remember that printing returns the furthest x position, so you can easily determine word wrapping by drawing off-screen

Good luck, hope this helps!

Host

Great work!  Thanks much!

Submitted(+1)

Updated: forgot to mask out some bits from the first attribute byte written, so it was incorrectly spacing and adjusting ‘!’ depending on which font you used.

Host (1 edit)

Okay cool!  It downloads with a weird name, maybe suggest saving as fontloader.p8.png?

Submitted

Huh, that’s what I uploaded. I’ll fix it.