Playdate button glyphs in Asheville and other fonts

I have only seen the playdate glyphs for up/down/left/right being included in the default system font. Is there a way to let font drawing fall back to those glyphs when they are not available in the requested font?

It should do.

If it's not doing so please provide a test case as a bug report.

1 Like

Do you mean if using any font, that if the font doesn't have the glyphs for the Playdate icons, the system should still display them properly? Because I've only ever seen it display the � icon when a font is missing the Playdate glyph.

https://sdk.play.date/inside-playdate/#_supported_characters

Supported characters

If a replacement character is specified it will be drawn in place of any missing characters in your font. If it is not, characters missing from the font will be drawn using the system font, if available.

So I guess that means if the font has the question mark diamond it will be used. To get the system font, remove that character from your font?

1 Like

Ah yes, obviously! Once again, reading more carefully could have saved past-me some wasted time :sweat_smile: For some reason I assumed that character represented "empty," but it seems it's actually a placeholder for empty.

1 Like

Sounds very plausible, but when trying this with Asheville Sans 14 bold, no character is drawn.
So, with the original font, I get the boxes that are mapped to �.
With the original font file from the sdk I get this:
image

If I remove line 295 from the fnt file,
I get this:
image

    gfx.drawTextInRect("⬅️➡ challenge   Ⓐ start", detailRect.x, detailRect.bottom , detailRect.width, 20, nil, "...", kTextAlignment.center, asheVilleFont)

This is a duplicate of Using glyphs illustrated in "Designing for Playdate" - #7 by BleuLlama

1 Like