Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Pasty

Pages: [1]
1
NGUI 3.7.1 - I haven't updated because I have functionality was added on to NGUI that I haven't had a chance to port over and the posted change logs don't seem to relate to this issue
Label's text is assigned via UILocalize, using a csv file
Label overflow is set to ResizeHeight

2
Doesn't seem like I had any of those non-breaking space characters in the my exported text file. To be sure, I did an export, replace all, and rebuild to be sure. Issue persists.

Image attached:

3
NGUI 3 Support / Word wrapping incorrect (maybe due to special characters?)
« on: December 29, 2014, 02:35:41 PM »
I have encountered an issue similar to the one found here:
Word wrapping in UILabel breaks at last character

I see the same issue under fairly uncommon circumstances, and I'm not sure which one is specifically to blame:
  • Dynamic text localized using NGUI functionality
  • Includes Spanish special characters (ó or á are present in the same line in documented occurrences of the issue)
  • Issue only occurs on iOS devices (Unity Editor and Android don't seem to have the issue)

Also of note is that we have only seen the issue occur with words that end with an "n". Probably a coincidence. The font we use is attached.

Update:
Another thread was just brought to my attention:
http://www.tasharen.com/forum/index.php?topic=6313.15
I am also exporting from google docs! I'll try some stuff relating to the space character as listed.

4
NGUI 3 Support / Nested soft clip Panels in Flashplayer
« on: October 08, 2014, 12:36:50 PM »
There seems to be a Panel display bug in Flashplayer builds. If a UIPanel is the child of another UIPanel and both are set to Soft Clip, the child UIPanel will not render in Flashplayer builds.

This is not the case for unparented UIPanels set to Soft Clip. In some cases (i.e. while moving a scrollview) the bugged panel will render for a frame. I've attached an example scene, but you'll likely have to modify NGUI a bit to get it to run. NGUI does not seem to compile for Flashplayer out of the box and I had to make some modifications to fix that. I am using NGUI 3.7.1

5
NGUI 3 Support / Re: Dynamic Fonts in Flash
« on: September 15, 2014, 02:41:57 PM »
I looked into it myself and did the following:

removed #if !UNITY_FLASH wherever it preceded #define DYNAMIC_FONT (7 files)
UIFont.cs - replaced fontNames[] usage (No support in UnityEngine)
UILabel.cs - replaced use of '++usage' with sepeate line for incrementing
UILabel.cs - created custom LastIndexOfAny() and IndexOfAny() methods to replace incompatible ones
UIWidget.cs - switched to if (!(mOnRender == value)) since Flash doesn't support .Equals()

Seems OK now!

6
NGUI 3 Support / Dynamic Fonts in Flash
« on: September 11, 2014, 02:53:48 PM »
It seems that dynamic fonts are working in Flash player builds in Unity 4.5.3. Are there any plans to add support for this with NGUI?

7
NGUI 3 Support / Re: Text baseline alignment issues
« on: May 14, 2014, 04:21:01 PM »
Please excuse the double post

I've been struggling with this a bunch today and I think I'm closer to the issue. It seems to happen with every font, but is much more prevalent in the one I posted above. Part of the problem seems to simply be the dynamic textures are generated. Rounded edges at the baseline will extend lower than flat edges (See attached image)

Then, when this texture is scaled, the problem is exacerbated and can lead to as much as a two pixel difference between round-bottomed and flat-bottomed characters.

I plan on trying a few things to minimize the effect: Changing fonts, writing a script to keep the game window within even-valued dimensions, and re-checking all my label scaling and positioning.

I would still greatly appreciate any other ideas for solving this issue.

8
NGUI 3 Support / Re: Text baseline alignment issues
« on: May 14, 2014, 11:11:57 AM »
I tried out a few things:
Made sure window dimensions were even numbers
Made sure UI root panel dimensions were even numbers
Made sure Label scale was 1 and position was whole, even numbers
I had to keep UI root at FixedSize and the entire project I'm working on was designed this way. I made sure the manual height was an even value.

Still got the same issue at some dimensions, it's just something about the way curves are being filtered as opposed to straight lines. Straight lines seem to tend to sit exactly on a pixel baseline (they rarely get any aliasing at the baseline, pixels are usually either solid or blank when compared vertically) while curved characters are aliased below that baseline.

I also tried adding the rounding code you provided to NGUIText. Rounding y values leads to the reverse of my issue, with the baseline of straight-edged characters appearing slightly lower than that of rounded characters. It's almost as if all rounded characters are offset 0.5 pixels from straight-edged characters.

9
NGUI 3 Support / Text baseline alignment issues
« on: May 13, 2014, 01:42:31 PM »
I'm experiencing some issues with dynamic fonts incorrectly lining up vertically. See attached image.

At first I thought this might be an issue with the calculated baseline of the characters, which I know has changed in recent versions of NGUI. I tried a few older versions and am still getting the same results. Now I believe it has to do with the way Unity is handling the scaling of the characters. If you look at image, you can see that only those characters with flat horizontal pixels along the baseline appear slightly raised.

To reproduce:
Create a label and set Keep Crisp to Always
Set UI Root to FixedSize or to a PixelPerfect range that the actual window size is outside of, so that the UI is being scaled (may not be necessary)
Try a few different screen dimensions, the problem is more apparent at different heights

The font I am using is also attached for reference. Does anyone have any insight here or suggestions?


EDIT: In doing some testing, I found that the filtered font texture does not update on viewport resize. Doing it manually (setting Keep crisp to Never and back) will leave you with a different looking label. However, this does not resolve my issue fully.

Pages: [1]