在 iOS 上绘制缩放的表情符号图标
我正在尝试实现自己的表情符号图标键盘,但遇到了一些问题。我试图以与本机 iOS 表情符号键盘相同的大小绘制表情符号图标,但在进行简单绘图时(标准 unicode 字符,例如 "\ue415"
)图标始终以原始大小显示。当尝试增加字体时 - 表情符号图标保持相同的大小。当应用 CGAffineTransform 进行缩放时 - 绘制的图标更大,但像素化且模糊。我应该如何将表情符号图标画得更大、更清晰?
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 when 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
ei,您可以设置字体来缩放表情符号图标,如下所示:
ei, You can set the font to scaled the emoji icon like this:
表情符号图标以 PNG 文件形式存储在 /System/Library/PrivateFrameworks/WebCore.framework 中(我在网上找到了此信息,但由于我没有越狱的 iPhone,所以无法确认)。我认为在不损失质量的情况下扩展它们是不可能的。
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.
在 iOS 5 中,png 文件消失了,因为它们已转移到 OSX Lion 中使用的相同字体。它被称为苹果彩色表情符号。
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.