Author Topic: UILable: Overflow wraps with ResizeFreely when spacing-x is greater than zero  (Read 5608 times)

wcoastsands

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Just updated to the latest versions of NGUI (v3.0.9f7) and Unity (4.0.4, from 4.0.2). I'm currently using Dynamic fonts throughout my project. Since the update, anywhere that I have a UILable with Overflow set to ResizeFreely, and the X value for Spacing set to an int greater than 0, the last character in the string wraps to a second line.

Saw in the release notes there were improvements done on the UILable with Dynamic fonts. Any chance something got overlooked with respect to Overflow and Character Spacing?

Or maybe I'm missing something else here. Any suggestions would be much appreciated. Thanks!

wcoastsands

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Seeing some relevant posts float to the top of the support forum here. Going to try a few of the suggestions listed in the following links, including switching to bitmap fonts. Really need the ability to use ResizeFreely, specifically to handle formatting changes between localization options.

http://www.tasharen.com/forum/index.php?topic=6894.0
http://www.tasharen.com/forum/index.php?topic=7399.msg34945#msg34945

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Bug, will fix for the next release.

wcoastsands

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Cool. Thanks for the heads up :) Saves me some time. Will work around it for now. Thanks!

jjsteele

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Still seems to be happening in 3.4.7

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
How can I repro it, jjsteele?

TegTap

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 5
    • View Profile
UPDATE: v3.4.8 seems to have fixed this issue, thanks!  I'll leave my original post anyway:

I'm getting this problem regardless of x spacing.  It occurs when overflow is set to ResizeFreely.  For a given UILabel, it will only happen when a certain amount of characters are input.  For example, when I input "<score>", I get the following:

<score
>

but when I input "<score1>", It displays correctly:

<score1>

Changing the x spacing will change when the bug shows up.  The above example was with x spacing set to 0.  Changing the x spacing to 2 made "<score>" display properly, but "<score1>" was displayed like so:

<score1
>

As most of my labels are ever-changing in character length during runtime, sometimes they display correctly and sometimes they don't.  I am using a bitmap font.
« Last Edit: February 01, 2014, 02:55:49 PM by TegTap »