Comment savoir si une police particulière a un glyphe spécifique> 64k

Il est relativement facile de déterminer si une police Unicode particulière contient un glyphe pour un sharepoint code lorsque le sharepoint code correspond à une valeur de 64 bits.

if (CTFontGetGlyphsForCharacters(ctFont, chars, glyphs, 1)) { // It exists } 

Mais CTFontGetGlyphsForCharacters prend un tableau de UniChar, qui est un type de 16 bits. Existe-t-il une méthode pour déterminer si un glyphe est disponible pour un personnage au-delà? Par exemple, U + 1F4A9?

C'est ce que j'ai fini par utiliser (où codePoint est le sharepoint code 32 bits que vous voulez tester):

  UniChar characters[2]; CFIndex length = (CFSsortingngGetSurrogatePairForLongCharacter(codePoint, characters) ? 2 : 1); CGGlyph glyphs[2]; if (CTFontGetGlyphsForCharacters(ctFont, characters, glyphs, length)) { // It Exists }