Author Topic: Dynamic font support for NGUI  (Read 105766 times)

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: Dynamic font support for NGUI
« Reply #135 on: March 19, 2013, 09:37:59 AM »
I have some issues when using fonts on 3D cameras, sometimes when I add more assets they just disappear and if I move 1 of the labels on the Z-axis (ie: -45) appears all the labels again. Which could be the problem?

GaVaR

  • Guest
Re: Dynamic font support for NGUI
« Reply #136 on: March 20, 2013, 08:47:40 AM »
I have some issues when using fonts on 3D cameras, sometimes when I add more assets they just disappear and if I move 1 of the labels on the Z-axis (ie: -45) appears all the labels again. Which could be the problem?

This appears because dynamic fonts use own material, so you need to adjust Z-axis as it's done with different atlases.

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: Dynamic font support for NGUI
« Reply #137 on: March 20, 2013, 09:33:49 AM »
This appears because dynamic fonts use own material, so you need to adjust Z-axis as it's done with different atlases.
And there's no fixes for this?

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: Dynamic font support for NGUI
« Reply #138 on: March 20, 2013, 03:52:03 PM »
New version (2.5.0) and no Dynamic Font, that's a shame... anyways a lot of cool things.

Ferazel

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 150
    • View Profile
Re: Dynamic font support for NGUI
« Reply #139 on: March 20, 2013, 07:02:31 PM »
New version (2.5.0) and no Dynamic Font, that's a shame... anyways a lot of cool things.

It sounds like it is on the list for ArenMook to get implemented into NGUI after GDC. I'm really looking forward to this feature being officially integrated as well.

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: Dynamic font support for NGUI
« Reply #140 on: March 21, 2013, 12:15:49 PM »
It sounds like it is on the list for ArenMook to get implemented into NGUI after GDC. I'm really looking forward to this feature being officially integrated as well.


Yeah, I can wait.
« Last Edit: March 22, 2013, 07:33:04 AM by jeldrez »

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: Dynamic font support for NGUI
« Reply #141 on: March 28, 2013, 12:52:41 PM »
I just update (2.3.4) and the texts look corrupt.
The "funny" part it's looks good until I press play. What could be?

« Last Edit: March 28, 2013, 01:05:39 PM by jeldrez »

GaVaR

  • Guest
Re: Dynamic font support for NGUI
« Reply #142 on: March 30, 2013, 11:00:47 AM »
And there's no fixes for this?

Currently you can do nothing instead of adjust Z-axis. This requires refactoring in NGUI drawing system, so that objects draw order will depend on Depth independently of Z-axis.

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: Dynamic font support for NGUI
« Reply #143 on: April 02, 2013, 05:26:50 PM »
New update (2.5.0) and have and issue in UIFont.cs:

Assets/NGUI/Scripts/UI/UIFont.cs(584,113): error CS1061: Type `BMFont' does not contain a definition for `MatchSymbol' and no extension method `MatchSymbol' of type `BMFont' could be found (are you missing a using directive or an assembly reference?)

I tried to merge both scripts, but are really different.

Did someone do a new UIFont.cs version for 2.5.0?

Thanks in advance!

Amitloaf

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 31
    • View Profile
Re: Dynamic font support for NGUI
« Reply #144 on: April 03, 2013, 10:31:34 AM »
Another update (2.5.1) and still no dynamic fonts. Any ETA to when it would be officially ready?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic font support for NGUI
« Reply #145 on: April 03, 2013, 02:46:50 PM »
Dynamic font support will be in 2.6.0. I was busy with GDC for the past 2 weeks.

N3uRo

  • Guest
Re: Dynamic font support for NGUI
« Reply #146 on: April 03, 2013, 03:29:43 PM »
Dynamic font support will be in 2.6.0. I was busy with GDC for the past 2 weeks.

Great news!!

Thanks Aren!!

adam718

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 60
    • View Profile
Re: Dynamic font support for NGUI
« Reply #147 on: April 05, 2013, 02:26:17 AM »
Great, Aren,
You're lifesaver for Asian developers.
Thank you,
And thank to Niki.

Mudwiz

  • Guest
Re: Dynamic font support for NGUI
« Reply #148 on: April 05, 2013, 03:24:58 AM »
Maybe yoffset issue is outdated, but I couldn't find any comment that it is solved, so I hope this helps someone.
I use a function below to calculate yoffset.
It is related with the imported font size as Unisip mentioned before (see page 2 of this thread).
So I changed inspector code to get it from the user, designer in my case, as variable 'TTFSize', and added to vert's y value.
Lowercase y or g is still printed below the bottom line, but other letters are in the box.

   private float CalculateYOffset()
   {
      float yoffset = ((dynamicFontSize / (float)TTFSize) - 1.0f);
      int lineHeight = (charSize + mSpacingY);
      yoffset += lineHeight * (TTFSize / (float)dynamicFontSize);
      yoffset -= lineHeight;

      return yoffset;
   }


Hope 2.6.0 comes soon!
« Last Edit: April 05, 2013, 06:11:54 AM by Mudwiz »

jarjin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: Dynamic font support for NGUI
« Reply #149 on: April 05, 2013, 05:07:42 AM »
Great news!! thank goodness!!! thank ArenMook!!!!!!!!!!!!!