Fallback typeface on Mac

Hi all,

when I set a font with Font(“Typaface_that_doesn’t_exist”, 12.f, Font::plain) I get the font I would get with Font(12.f) on windows (haven’t checked whether it really is the same font, but I can write something readable). On Mac I get some kind of empty font that doesn’t render any text.
At the moment I check for getStringWidth(“test”)>0 (which is zero for the latter case) and manually set the standard font if needed.

Is there a fallback typeface that is taken on Win but not on Mac or is there something I do wrong?


Yeah, it’s a problem to implement a fallback font on the mac - I couldn’t find any way to get the system to tell me whether a glyph is present in the font or not. I’ll take another look at it when I get chance, it was something I’ve been meaning to look at again.