UTF-8 symbol ⌘ with embedded font

I’m embedding a font in my application and trying to use a specific symbol from that font. I used Projucer’s handy tool and got:


which seems fine. When I use drawFittedText to render that string it always produces:


instead of the “Place of interest sign” I was expecting. I assume this is telling me that the code is being interpreted as a simple Latin-1 character. I did check that the font has the correct glyph for code \u2318. What am I missing?

Thank you,

David A. Hoatson

Are you certain the font that you are embedding fully supports the UTF-8 Miscellaneous Symbols category? Try it out with a font like Everson Mono and see if the symbol is rendered correctly.

I’m using Windows, so that font doesn’t exist but ‘Cambria Math’ does and it does show that symbol correctly… arrg. Don’t know why I didn’t think of that. I even checked the embedded font with a font viewer and it showed the symbol, so the font viewer must have been doing a substitution for some stupid reason. Thanks for your help. Plan B it is.

A font viewer typically uses fallback fonts provided by the system, or via some configurable settings.

On Windows, you will see Arial Unicode MS as the typical fallback font as it’s rather more encompassing than most fonts available.