Trouble with system font

Hey there. I'm attempting to load the system font in order to use some of the custom playdate button characters. I'm using:

local font <const> = gfx.getSystemFont("normal")

However, when I draw text using this font it falls back to using Asheville instead. I also tried passing kVariantNormal with identical results. I can easily drop the Roobert font files into my project, in which case I can load it by path and it renders just fine. I'd just like to understand why the system font approach isn't working. I fear I'm missing something obvious.

As an aside, I also noticed that Asheville only includes the playdate special characters in the normal variant, not bold or italic. Probably no big deal, though, given that it's intended to appear when the intended font is missing characters.

Thanks in advance!

The default system font in this context is Asheville, so what you're seeing is expected behavior. (we do use Roobert for our "system" apps, so I understand the confusion!). We should probably mention the name of the font in the docs for that method.

I'll make a note of those missing characters, we should probably get them added - thanks for pointing that out!

Oh man, I feel silly. I reread the System Font section of Designing for Playdate twice, and failed to connect the dots. Since it starts out by talking about the “System UI” being set in Roobert I thought that meant it was the system font. Thanks for clarifying!

Well, on that note, why is Asheville the system font? It goes against the best practices for fonts discussed in the document (like 1 pixel strokes), and is called out as something intended to show when a font fails to load. Seems odd to have a dedicated API for accessing a font that you recommend against using! Wouldn’t Roobert be a better choice? But either way, the “workaround” is easy. :slight_smile:

1 Like

No need to feel silly at all, it's confusing that we're referring to both using the word "system"!