UILabel,UIFont和UTF-8三角形 [英] UILabel, UIFont and UTF-8 Triangle
问题描述
我想使用BLACK RIGHT-POINTING TRIANGLE(U + 25B6)作为我的 UILabel
的文本的一部分。标签使用系统字体( UIFont
的 systemFontOfSize:
)。问题是,我的三角形被渲染为一个花哨的图像,而不是一个黑色右指向三角形。
I'd like to use "BLACK RIGHT-POINTING TRIANGLE" (U+25B6) as a part of my UILabel
's text. The label uses the system font (UIFont
's systemFontOfSize:
). The problem is that my triangle is rendered as a fancy image, not a "black right-pointing triangle". Is it possible to see the plain version?
推荐答案
基于:
iOS 6支持 Unicode 6.1的变体选择器,在这种情况下 \U0000FE0E
。要回答我自己的问题:
iOS 6 supports Unicode 6.1's variation selector, in this case \U0000FE0E
. To answer my own question:
@"\U000025B6" // a fancy triangle (mapped to Emoji)
@"\U000025B6\U0000FE0E" // black right-pointing triangle
http://www.unicode.org/versions/Unicode6.1.0/
感谢@ martin-r和@ACB,如果没有你的提示,我就不能明白!
Thanks @martin-r and @ACB, I wouldn't be able to figure this out without your hints!
这篇关于UILabel,UIFont和UTF-8三角形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!