Author Topic: Can't seem to get Fonts right  (Read 4483 times)

selzero

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 14
    • View Profile
Can't seem to get Fonts right
« on: July 31, 2013, 03:12:08 AM »
Hi Guys,

I've been using NGUI for a while now and it makes my life a lot eaiser. However, I have never really managed to find a work pipeline that gives me consistently crisp fonts.

- I check the positions of all the items in the hierarchy and make sure there are only rounded numbers.
- I check the scale of the items in the hierarchy and make sure there are only round numbers
- I assign both a unique Z axis and a unique "depth" value to the label.
- I use a single Atlas on the scene, other than the font atlas ofcourse.

I can have everything set up perfectly, then some change somewhere (eg the addition of a new font) will completely mess up the rendering of the fonts on the screen.

Is there some kind of a step by step to-do list that will explain what I have to look out for when using fonts?

The problem I have at the moment is that the atlas used for the labels background is different from the fonts atlas, am I supposed to be adding the font map to the main atlas?
« Last Edit: July 31, 2013, 03:19:47 AM by selzero »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Can't seem to get Fonts right
« Reply #1 on: July 31, 2013, 01:08:03 PM »
Some info is missing: what version of NGUI are you using? What is "completely mess up"? Before and after pics would help. Are you saving the scene after every modification to the atlas?

And yes, you should put the font into the same atlas as your sprites if you can. It will make your life easier.

selzero

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 14
    • View Profile
Re: Can't seem to get Fonts right
« Reply #2 on: July 31, 2013, 03:52:15 PM »
Adding the font maps to the atlas fixes it, but its a little concerning. How big do you recommend I keep the atlas image? Is there an upper limit to how big the atlas can be on mobile devices? What is recommended?

ChrisR

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 33
    • View Profile
Re: Can't seem to get Fonts right
« Reply #3 on: August 01, 2013, 06:44:16 AM »
Max texture size is device dependent. It's 1024x1024 for Iphone 3G, 2048x2048 for 3GS, Iphone 4, and Ipad 1, and 4096x4096 for devices newer than those.

Edit: and Android obviously has their own range, so you'll need to check that individually.

selzero

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 14
    • View Profile
Re: Can't seem to get Fonts right
« Reply #4 on: August 02, 2013, 03:39:56 AM »
Thanks Chris