Author Topic: Dynamic Fonts v2.6.0  (Read 25238 times)

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #15 on: April 24, 2013, 12:47:21 PM »
Disappearing is likely Z-related. Keep in mind dynamic fonts are drawn using a separate draw call, so they have to be moved in front of your UI by adjusting Z (negative).
But it was working with the "old" dynamic font version, now it doesn't. How different they are?


Corrupt font? Need repro steps for that.
There's not to many steps, it happens all the time navigating between menu.

\n in the text area -- why have it there? Just press Enter to create a new line.
Because I test the localized text there, then just copy/paste to my .txt file. But I don't really need this, but the things above are important.

PoN

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 111
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #16 on: April 25, 2013, 04:44:48 AM »
Aren when will you add dynamic fonts to the standart version NGUI ?
Worked on Doc&DogAge Of Fury 3D. Actually working on WarMach.

jarjin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #17 on: April 25, 2013, 07:53:47 AM »
I also want to know!~

glueng

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #18 on: April 25, 2013, 10:47:28 AM »
Corrupt font? Need repro steps for that.
Observed that issue in our projects. It happens if dynamic font texture expands in Unity scene that have been already constructed(for example, some UILabel text changed from an Update() to string that contains new characters).

STR:

-create UI with 2 UILabel's that share one dynamic font. Make characters size large enough so font texture will expand if characters amount in the scene would increase.
-run the scene
-start typing different characters in the first label until font texture expands
result: the first label is ok, but the second one is corrupted

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #19 on: April 25, 2013, 12:45:15 PM »
I'll release 2.6.0 when issues get ironed out.

@glueng: thanks, I'll investigate.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #20 on: April 25, 2013, 01:39:42 PM »
Right, then... not getting this issue. I created 2 dynamic fonts, 2 labels, entered some text into them, added a script to them that changes the text in Start() function to something that doesn't exist in the font yet, built to device -- works fine. Anything else you're doing differently?

jarjin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #21 on: April 25, 2013, 08:57:48 PM »
@ArenMook  If there is a font texture size limit (default is 256*256) on the NGUI2.6 dynamic font?????

glueng

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #22 on: April 26, 2013, 03:26:18 AM »
...I created 2 dynamic fonts...

You need to use one dynamic font, the same for both labels.

PoN

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 111
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #23 on: April 26, 2013, 03:44:55 AM »
I'll release 2.6.0 when issues get ironed out.
Thanks, i will be waiting for it.
Worked on Doc&DogAge Of Fury 3D. Actually working on WarMach.

glueng

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #24 on: April 26, 2013, 04:49:05 AM »
added a script to them that changes the text in Start() function to something that doesn't exist in the font yet
And please note that expanding of font texture at Start doesn't corrupt labels. You need to add symbols from Update() to reproduce the issue.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #25 on: April 26, 2013, 01:21:35 PM »
Alright, duplicated a label using the same font. Modified the test script to this:
  1. using UnityEngine;
  2.  
  3. public class TestFnt : MonoBehaviour
  4. {
  5.         void Update ()
  6.         {
  7.                 if (Input.GetKeyDown(KeyCode.T))
  8.                 {
  9.                         UILabel lbl = GetComponent<UILabel>();
  10.                         lbl.text = "@$$^%*";
  11.                 }
  12.         }
  13. }
...again works fine.

glueng

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #26 on: April 29, 2013, 07:07:50 AM »
...again works fine.

Did the font atlas expanded after characters adding? The issue happens ONLY if new characters doesn't fit current atlas size and force the font texture size to increase

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #27 on: April 29, 2013, 07:16:29 AM »
Did the font atlas expanded after characters adding? The issue happens ONLY if new characters doesn't fit current atlas size and force the font texture size to increase
how do you have an atlas?

glueng

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #28 on: April 29, 2013, 07:43:40 AM »
how do you have an atlas?

By atlas I mean dynamic font texture which contains characters.

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #29 on: April 29, 2013, 08:13:46 AM »
By atlas I mean dynamic font texture which contains characters.
Ouhh, ok.