There are some great tools for making or converting fonts, but I couldn't find any way to preview every font already provided by Panic. So I made one!
The linked .pdx lets you see lorem ipsum for all 54 fonts provided by Panic, with up, down, and crank cycling through the fonts.
BUT WAIT, THERE'S MORE!
If you add the "testfont.lua" file and dependencies into a game's build directory, you can dynamically change fonts at build or runtime, to see how all 54 fonts would look in your game!
Just use testFont()
in place of the playdate.graphics.font object, .i.e.:
playdate.graphics.setFont(testFont())
Depending on the value of testFont.current_font_number
(1-54), the corresponding font will be inserted. If you change testFont.current_font_number
at runtime, then the font will be updated the next time you run setFont()
.
But what use is knowing the "number" of the font? Use testFont.getName()
to
- return the file path of font (within the
Resources/
folder of the Playdate SDK) - print both the font path and the font "number".
Hope people find this useful!