Hi,
Does anyone know of a workaround to get Core Text to display Emoji on
iOS? As of iOS 5.0, it still replaces Emoji characters with glyph=7
I have a short snippet that I used to verify it, but not sure how I
can work around it.
CFArrayRef lines = CTFrameGetLines(_textFrame);
CTLineRef line = CFArrayGetValueAtIndex(lines, 0);
CFArrayRef glyphRuns = CTLineGetGlyphRuns(line);
CTRunRef run = CFArrayGetValueAtIndex(glyphRuns, 0); //loop
CGGlyph* buff = malloc(100*sizeof(CGGlyph)); //get size instead of 100
CTRunGetGlyphs(run, CFRangeMake(0, 0), buff);
if (buff[0] == 7) { // should loop buffer
//goes here if character is Emoji.
}
See:
http://openradar.appspot.com/8234470
Thanks.
---
Hwee-Boon