Author Topic: UILabel smoothness  (Read 5244 times)

malast

  • Guest
UILabel smoothness
« on: April 23, 2012, 10:45:37 PM »
I have made a font using BMFont tool, than placed the UILabel with this font on the PUIanel. While in fullscreen all the letters are sharp, and look nice for any screen resolution. While in window mode a problem occurs.

I need have a Unity embed container's size of 827x517 (a standard Unity web aspect ratio). When I make embed with such size, a letters are very smooth and look ugly. When I make embed with the size of 800x600 or 1024x768 all letters are ok, like fullscreen. But I need a size of 827x517 for my embed. How can I make letters sharp with that size?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UILabel smoothness
« Reply #1 on: April 23, 2012, 10:57:20 PM »
You shouldn't use odd dimensions like that. 826x516 would look fine. 827x517 means your UI is always going to be offset by a half-pixel, and will look blurry. If you absolutely can't use even dimensions, set the UIRoot to manual mode and specify 516 or 518 for its height.

malast

  • Guest
Re: UILabel smoothness
« Reply #2 on: April 23, 2012, 11:30:24 PM »
Thank you, Aren. I really can use 827x517 only.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UILabel smoothness
« Reply #3 on: April 23, 2012, 11:31:32 PM »
Strange limitation...

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: UILabel smoothness
« Reply #4 on: April 24, 2012, 02:44:27 AM »
If in doubt, hack it.

Offset your root's transform by 0.5f on X and/or Y, then it should unblur.