Author Topic: Can make a change that UILabel or UIWidget support multi-materials?  (Read 2362 times)

xiexbmu

  • Guest
Hi,there :)
Now UILabel only supports one material,so if I want to make such as Chinese font texture to more than one texture,I cannot find a way to switch the different textures quickly.And yes,maybe I can switch the texture by setting the only material,but it has a performance hit.
So may I ask:Can you ArenMook support multi-materials for UIWidget?

Thanks,:)
Harry

lime-green.at

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 60
    • View Profile
Re: Can make a change that UILabel or UIWidget support multi-materials?
« Reply #1 on: December 05, 2012, 01:37:51 AM »
In your Bitmap-Font generator (i use bmfont) you can set the width and height of the output image:


To check if the font bitmap needs a bigger size, just check all your characters and then go to Options -> Visualize, in that new window title you now can see something like "Preview: 1/2", then just choose a bigger size and check again.

Regards

xiexbmu

  • Guest
Re: Can make a change that UILabel or UIWidget support multi-materials?
« Reply #2 on: December 05, 2012, 01:49:06 AM »
Hi, axm0nky.  Thanks for your advise,it's helpful.:)
But what we worried is that we cannot put so many characters in only one texture,no matter how the texture big is.
Thanks, :)
Harry

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Can make a change that UILabel or UIWidget support multi-materials?
« Reply #3 on: December 05, 2012, 02:58:59 AM »
You can't have more than one texture used by the font. If you can't fit all the glyphs into one font texture, look into the packed font feature. You can fit 4 times the characters into one texture that way. There is a video on it.

xiexbmu

  • Guest
Re: Can make a change that UILabel or UIWidget support multi-materials?
« Reply #4 on: December 05, 2012, 04:05:14 AM »
Hi,ArenMook.Thanks very much!
And I'll try it. :)
Harry.