Author Topic: Wrong gradient size for different font-sizes  (Read 1656 times)

AGB

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 74
    • View Profile
    • Steam Defense
Wrong gradient size for different font-sizes
« on: February 04, 2014, 03:55:57 AM »

I'm a busy man... I have places to go,monsters to kill...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Wrong gradient size for different font-sizes
« Reply #1 on: February 04, 2014, 04:10:43 AM »
How would I reproduce this? I Just tried this:

1. New scene.
2. ALT+SHIFT+L, chose Arial
3. Font size 32 -- looks fine. Font size 100 -- looks fine. Font size 136 -- looks fine.
4. Changed size of the label, overflow style, everything works as expected.

AGB

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 74
    • View Profile
    • Steam Defense
Re: Wrong gradient size for different font-sizes
« Reply #2 on: February 04, 2014, 07:12:05 AM »
It works with Dynamic fonts, but dont works with Bitmap fonts :(
I'm a busy man... I have places to go,monsters to kill...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Wrong gradient size for different font-sizes
« Reply #3 on: February 04, 2014, 07:41:43 AM »
You're right... that's a bug, thanks! I'll get it fixed for the next release.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Wrong gradient size for different font-sizes
« Reply #4 on: February 04, 2014, 07:51:32 AM »
You can also fix it locally by modifying NGUIText.cs, lines 1039 and 1140 from this:
  1. float min = sizePD + y0;
  2. float max = sizePD + y1;
To this:
  1. float min = sizePD + y0 / fontScale;
  2. float max = sizePD + y1 / fontScale;