Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increase the font size of emoji characters in a UITextView in iOS 5.x

If I have UITextView and set the font size to, say 32. When I run the application (in both simulator and on the device), I see a large cursor and text that I type appears just as I'd assume it would. But if I switch the the Emoji keyboard, they display small. Like the size of the font was never increased.

I know these emoji font scales, as I've blown them up to giant proportions in OSX Lion, and if I create a UIButton with an emoji character as it's label and set the font to "Apple Color Emoji" and the size to 64, they look huge and gorgeous on my device. It seems just the UITextView isn't resizing them.

like image 494
Steve E Avatar asked May 11 '12 22:05

Steve E


1 Answers

Have you tried setting the UITextView's font to AppleColorEmoji as well? On iOS, it seems that AppleColorEmoji is the only font that will draw scaled-up emoji. Use any other font, and the emoji never get larger than about 20x20 pixels, as you've noticed.

I did my tests using this handy free app called Fonts!, which is a nice way of getting quick feedback on the actual device itself.

I note that the Game Center app seems to be able to mix an interesting font with scaled-up emoji, so clearly it IS possible to do better than the (rather pedestrian) emoji font! I don't know whether this is something special in its code, though, or something special about the font it uses, which looks like a custom one.

like image 176
Tom Seddon Avatar answered Nov 12 '22 14:11

Tom Seddon