开发者

Drawing scaled emoji icons on iOS

开发者 https://www.devze.com 2023-02-02 20:05 出处:网络
I\'m trying to implement my own emoji icon keyboard and have some problems. I\'m trying to draw emoji icons at the same size as on native iOS emoji keyboard, but wh开发者_运维百科en doing simple drawi

I'm trying to implement my own emoji icon keyboard and have some problems. I'm trying to draw emoji icons at the same size as on native iOS emoji keyboard, but wh开发者_运维百科en doing simple drawing (standard unicode characters like "\ue415") icons always appear at original size. When trying to increase the font - emoji icons stay of the same size. When applying CGAffineTransform for scaling - drawn icons are bigger, but pixelated and blurred. How should I go about drawing emoji icons bigger, but sharper?


ei, You can set the font to scaled the emoji icon like this:

label.font = [UIFont fontWithName:@"AppleColorEmoji" size:16.0];


The emoji icons are stored as PNG files in /System/Library/PrivateFrameworks/WebCore.framework (I found this info on the net, but I can't confirm since I don't own a jailbroken iPhone). I don't think it is possible to scale them without loosing quality.


In iOS 5, the png files are gone because they have moved to the same font used in OSX Lion. It's called Apple Color Emoji.

0

精彩评论

暂无评论...
验证码 换一张
取 消