Author Topic: Bitmap Font Visual Glitch  (Read 2504 times)

slipstream

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Bitmap Font Visual Glitch
« on: May 29, 2015, 10:23:51 AM »
Hi!
Thank you for making NGUI its awesome :)

I have a problem with a Bitmap Generated Font that i made with the Font Maker tool.
After creating my Font and assigning it to my text, the font display properly, no problems.

However when i restart Unity It appear Glitched (Screenshot1)  Should display something like
00:00:000
00:00:000
LAP 0/2

If you look at the texture, there are no problems.
Also if you look at the glitched text, it looks like the 0 is replaced by 8.
The width of the 0 looks correct tho (the 8 is cropped on the right)
So my guess is that the coordinates are wrong or something.

I use a custom set of character to use only the minimum and make my texture as small as possible.
If you guys have any solution for this i would be happy.

Best regards.

Screenshot1 (Glitched Text)


Texture

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Bitmap Font Visual Glitch
« Reply #1 on: June 01, 2015, 08:30:48 PM »
That font doesn't look right... where is that edge on the right of '4' coming from? What font are you using? Make sure you have some padding in your atlas -- 1 pixel between sprites should be fine. You can also add padding on our font by selecting the UIFont prefab and using the +1 button.

slipstream

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Bitmap Font Visual Glitch
« Reply #2 on: June 07, 2015, 11:14:37 AM »
That font is totally right...
As i said the first time i create it i have no problem at all.
Its when i restart Unity that the font is broken.

This is clearly a bug, this guy have the same issue
http://www.tasharen.com/forum/index.php?topic=12501.0

It looks like the font reference is not cleared properly.

The only solution i have found that fix the problem is this :

- Delete the Font
- Restart Unity
- Recreate the font

But this is very annoying because when i delete the font i lost all the prefab reference to the font, so i need to reasign all of them manually wich is horrible.

Would love to see that fixed.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Bitmap Font Visual Glitch
« Reply #3 on: June 07, 2015, 12:51:48 PM »
The font reference thing has been fixed in the Pro version for quite some time, so you will see it in 3.9.0 -- but I don't really see how it can affect your issue. I guess you can try it after the update.

slipstream

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Bitmap Font Visual Glitch
« Reply #4 on: June 08, 2015, 05:09:10 PM »
Thank you for your reply.
Nice that you are aware of that problem.

Can't wait for 3.9.0 then.
Best regards.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Bitmap Font Visual Glitch
« Reply #5 on: June 09, 2015, 01:22:02 AM »
It's already out.