Author Topic: Font Artifacts (In Editor and In Game)  (Read 3789 times)

Lokken

  • Guest
Font Artifacts (In Editor and In Game)
« on: August 23, 2013, 02:09:14 PM »
Hello!

I am enjoying working with NGUI immensely and it is saving me a lot of time.

I am running into an issue with font effects that just started happening 'randomly'.

I originally applied the outline to my label text and it looked great because the outline color matched my window title bars and it looked very smooth.

However, something changed (or I did something) and now the effect looks like this:


This looks quite bad on my buttons and windows.

I know the outline re-draws the letters but for some reason there is now a somewhat grey outline to my font even with no outline, and its uneven, and darker than the target grey i want to hit (surrounding window bar):


I am not sure what is causing the un-even grey outline to be added to my characters.  I look at the raw font image that comes from BMFont and it is pure white.

Any ideas as to what happened?  Like I said it used to have a very nice smooth outline in grey.  I don't know what would have changed to make it uneven like above.

Thanks!

L

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Font Artifacts (In Editor and In Game)
« Reply #1 on: August 23, 2013, 02:18:33 PM »
Font's RGB color must be pure white. Only the alpha channel should show you the letters. If you're on Unity 4.2+ make sure to check "alpha is transparency" on both the font and the atlas textures.

Lokken

  • Guest
Re: Font Artifacts (In Editor and In Game)
« Reply #2 on: August 23, 2013, 02:39:49 PM »
Hi ArenMook

Thanks for the response.

I double checked that the font image (tga) has Alpha from Transparency set in its import settings.  It is completely white if I open it in photoshop.

I made sure to do the same for the Atlas' texture.

Unfortunately the odd grey outline on the font letters still remains on the atlas texture when I re-create the font.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Font Artifacts (In Editor and In Game)
« Reply #3 on: August 23, 2013, 02:43:18 PM »
Did you mistakenly check "PMA shader" on the atlas maker when adding this texture to the atlas?

Lokken

  • Guest
Re: Font Artifacts (In Editor and In Game)
« Reply #4 on: August 23, 2013, 02:47:11 PM »
Yes sir!  That was the problem.  I don't remember clicking that option but it cleared the issue up.

Thanks a ton!  This has been bothering me for weeks!   ;D

L