Author Topic: Dynamic font height  (Read 10387 times)

Grhyll

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 32
    • View Profile
Dynamic font height
« on: December 11, 2013, 09:20:00 AM »
Hello,

A few days only after my last topic, here I am again!
I now have a problem with one particular dynamic font, which behaves strangely with NGUI.
To illustrate that:

- The problematic font:


- Another font:


It's probably the font's fault (since other dynamic fonts work), however this problem does no show up with Photoshop, Word or even with Unity's GUI Text, only with NGUI.
Any idea how I could solve it? I can send you the font if needed (but not attach it to this topic, since it's not a free font).
« Last Edit: December 11, 2013, 11:35:51 AM by Grhyll »

Nubeh

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 41
    • View Profile
Re: Dynamic font height
« Reply #1 on: December 11, 2013, 09:27:21 AM »
Hey...yeah I have the same problem since weeks! I sent a bug report to Unity but they answered me back that the issue is with NGUI. You're the first one I found having the same problem...I was using a font that was working before Unity 4.3 bit after updating I had your same issue. I hope somebody can point out a solution for this.

Grhyll

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 32
    • View Profile
Re: Dynamic font height
« Reply #2 on: December 11, 2013, 09:33:38 AM »
It does not seem to come from Unity, indeed. I created 2 GUI Text with the two fonts presented, and they were perfectly aligned.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic font height
« Reply #3 on: December 12, 2013, 01:53:21 AM »
The core of the problem comes from the font itself. It's positioned oddly, and the information necessary to position it properly is not exposed on the scripting side. Unity often likes to hide stuff internally and not expose things to us users. Send me the font itself to support at tasharen.com and I'll see if there is anything I can do on the matter.

Grhyll

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 32
    • View Profile
Re: Dynamic font height
« Reply #4 on: December 12, 2013, 04:06:23 AM »
It has been sent! Thank you :)

Nubeh

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 41
    • View Profile
Re: Dynamic font height
« Reply #5 on: January 28, 2014, 07:40:56 AM »
Hi there,
for me this issue is still present. Any news about it? It was supposed to be fixed with the release f8 I think. Thanks for letting me know.


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic font height
« Reply #6 on: January 28, 2014, 11:31:45 AM »
NGUI fakes it by doing a best guess for what the offset should be since Unity doesn't expose that info. At present, this means that the font should be centered neatly when you fill it with tall characters like "|||||".

Nubeh

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 41
    • View Profile
Re: Dynamic font height
« Reply #7 on: January 29, 2014, 04:45:47 AM »
oh...I think I misread the post...my font problem is f a different kind actually. I'll open a new topic, sorry for the confusion.