問題描述
如果我有 UITextView 并將字體大小設置為 32.當我運行應用程序(在模擬器和設備上)時,我會看到一個大光標和我輸入的文本,就像我假設的那樣將.但是如果我切換表情符號鍵盤,它們會顯示得很小.就像字體的大小從未增加一樣.
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.
我知道這些表情符號字體比例,因為我在 OSX Lion 中將它們放大到巨大的比例,如果我創建一個帶有表情符號字符作為標簽的 UIButton 并將字體設置為Apple Color Emoji"和大小到 64 歲,它們在我的設備上看起來又大又漂亮.似乎只是 UITextView 沒有調整它們的大小.
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.
推薦答案
您是否嘗試過將 UITextView 的字體也設置為 AppleColorEmoji?在 iOS 上,AppleColorEmoji 似乎是唯一可以繪制放大表情符號的字體.如您所見,使用任何其他字體,表情符號永遠不會超過大約 20x20 像素.
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.
我使用 這個方便的免費應用程序 Fonts! 進行了測試,它是快速獲得有關實際設備本身的反饋的好方法.
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.
我注意到 Game Center 應用似乎能夠將有趣的字體與放大的表情符號混合使用,因此很明顯它可能比(相當普通的)表情符號字體做得更好!不過,我不知道這是它的代碼有什么特殊之處,還是它使用的字體有什么特殊之處,看起來像是自定義字體.
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.
這篇關于在 iOS 5.x 中增加 UITextView 中表情符號字符的字體大小的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!