Some unicode characters cannot be displayed on iOS, but are displayed correctly on OS X. Similarly, some unicode characters that iOS can display cannot be displayed on watchOS. This is due to different built-in fonts installed on these platforms.
When a character cannot be displayed - such as
You can use
CTFontGetGlyphsForCharacters()
to determine if a font has a glyph for a particular code point (note that supplementary characters need to be checked as surrogate pairs):Or, in Swift:
If you want to check the complete set of fallback fonts that the system will try to load a glyph from, you will need to check all of the fonts returned by
CTFontCopyDefaultCascadeListForLanguages()
. Check the answer to this question for information on how the fallback font list is created.Compare against the known, undefined character
U+1FFF
:using a png bitmap:
Answered here.