Author Topic: Adding emoticons to a bitmap UIFont  (Read 6522 times)

Wisteso

  • Full Member
  • ***
  • Thank You
  • -Given: 21
  • -Receive: 3
  • Posts: 103
    • View Profile
Adding emoticons to a bitmap UIFont
« on: February 18, 2015, 03:01:23 PM »
Hey guys.

I cannot seem to find any up to date explanation about how to add emoticons to a UIFont. It seems the approach has changed at least 2-3 times since its inception, and I keep finding old explanations that wont work with the latest version. The current UIFont has no section or panel for emoticons/symbols.

Adding the emoticon to the bitmap image itself is trivially easy, I just cannot find any way to define that symbol for the UIFont prefab.

Do I just create a new txt file and import it into "Import Data" with the following data?

  1. symbol seqence=:coins x=0 y=500 width=40 height=25

Bonus question: I read an old post that said emoticons wont be scaled, but cant I use the "Font Size" property on a UI label to do this? Seems to work for normal characters in the font.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Adding emoticons to a bitmap UIFont
« Reply #1 on: February 18, 2015, 05:33:37 PM »
No need to do any of this. Select the UIFont prefab and add them there. Choose a sprite, specify a sequence, click Add.

Wisteso

  • Full Member
  • ***
  • Thank You
  • -Given: 21
  • -Receive: 3
  • Posts: 103
    • View Profile
Re: Adding emoticons to a bitmap UIFont
« Reply #2 on: February 18, 2015, 08:49:50 PM »
Thanks for the tip!

The problem was that I wasn't storing my font in a UIAtlas, but as a stand-alone material/texture (no UIAtlas). The emoticon feature does not exist unless you use a UIAtlas it seems.

Maybe a "warning" type notification could be shown for users that are using a stand-alone material?