Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Bstar on March 09, 2017, 03:02:16 AM

Title: NGUI UILabel's Spacing does NOT work.
Post by: Bstar on March 09, 2017, 03:02:16 AM
Hello, I'm NGUI 3.11.2 and UNITY 5.4.4f1 user.

I want to use text using UILabel. But I can't use the letter spacing.

It works when negative number is specified, but if it is specified as a positive number,

it moves only by the corresponding number in front of the letter, it does not work.

How can I use it? Help me  :(

Thank you.
Title: Re: NGUI UILabel's Spacing does NOT work.
Post by: m32gunner on March 09, 2017, 07:59:42 AM
Same here, I think it's NGUI's problem since it's not working on both Unity and NGUI fonts.
Title: Re: NGUI UILabel's Spacing does NOT work.
Post by: ArenMook on March 10, 2017, 11:43:25 AM
Hmm... that got broken at some point I guess. Simple one line fix. Line 1644 of NGUIText.cs -- change from:
  1. if (finalSpacingX < 0f) w += finalSpacingX;
to:
  1. w += finalSpacingX;
Title: Re: NGUI UILabel's Spacing does NOT work.
Post by: m32gunner on March 10, 2017, 10:54:26 PM
Thank you! It worked perfectly. Have a great weekend, sir.
Title: Re: NGUI UILabel's Spacing does NOT work.
Post by: Bstar on March 12, 2017, 06:49:19 AM
Thank you so much! It works perfectly  :) :) :)
Title: Re: NGUI UILabel's Spacing does NOT work.
Post by: justinISO on April 12, 2017, 11:58:20 AM
So I made this fix and the spacing now works, however, now when it clamps the content, it drops the last character or two of the last word down to a second line.
Title: Re: NGUI UILabel's Spacing does NOT work.
Post by: ArenMook on April 14, 2017, 04:07:21 PM
Doesn't do that on my end, justin -- so I'll need a repro case showing how it breaks for you.
Title: Re: NGUI UILabel's Spacing does NOT work.
Post by: Tr0sT on April 26, 2017, 11:35:50 AM
line 1015 of nguitext.cs (CalculatePrintedSize function):
change from:
  1. if (finalSpacingX < 0f) w += finalSpacingX;
to:
  1. w += finalSpacingX;

to fix problems with ResizeFreely, Clamp, etc
Title: Re: NGUI UILabel's Spacing does NOT work.
Post by: ArenMook on April 28, 2017, 09:48:52 AM
Guess I missed that one. Thanks, Tr0sT!