Author Topic: Dynamic Font package for NGUI 2.5.1 (for unity 4.x)  (Read 38346 times)

DarkMagicCK

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 20
    • View Profile
Re: Dynamic Font package for NGUI 2.5.1 (for unity 4.x)
« Reply #15 on: April 09, 2013, 10:51:16 PM »
some time, i meant this solution:in phone, some of the world cannot be printed.
Maybe When UIFont callback OnFontRebuilt() function,some labels were not be repaint in cellphone android environment.
Can you help me ?
ps:
   font.dynamicFont.textureRebuildCallback += OnFontRebuilt;
Sorry I do not own an android device, this package has not been tested on android.
Someone else can help?

DarkMagicCK

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 20
    • View Profile
Re: Dynamic Font package for NGUI 2.5.1 (for unity 4.x)
« Reply #16 on: April 09, 2013, 11:14:51 PM »
One more thing... in looking at the output from my previous screenshot, you'll see the baseline of the font seems off making look a bit like a ransom note. When I used this previously with BMFont (with only using the 'recommended' settings for NGUI) it looked correct. Do you know if there something else I can tweak to make this more even?
Oh I see that, like one pixel clip.
The char uv info is from UnityEngine.Font, there's not much we can done for this.
Font's texture's filter mode is unchangable either.
Only one thing - the font's importing settings has a Rendering Mode option. I tried OS Default, but the result is like shit.

huixiong

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: Dynamic Font package for NGUI 2.5.1 (for unity 4.x)
« Reply #17 on: April 11, 2013, 07:26:47 AM »
Sorry I do not own an android device, this package has not been tested on android.
Someone else can help?
I found that:in android env,when rebuild dynamicFontMaterial,some of the labels's letters were not be printed to the material.
can these letters be printed first,then cleaned last?
And
    when i disable a panel, then enable it, the letters are not be printed,is it?
my sys is android 4.0.4. sony lt26i
« Last Edit: April 11, 2013, 08:00:27 AM by huixiong »

Sayid

  • Guest
Re: Dynamic Font package for NGUI 2.5.1 (for unity 4.x)
« Reply #18 on: April 11, 2013, 08:51:30 PM »
I got a problem here.Once I set the dynamic font size in prefab, I can not change it anymore(I mean , I can change it in inspector, but it will set back when I am running my project). Can you give me some ideas ? Thanks.

Sayid

  • Guest
Re: Dynamic Font package for NGUI 2.5.1 (for unity 4.x)
« Reply #19 on: April 11, 2013, 08:58:11 PM »
Alright. I got a solution.Remove UIFont script,and re-Add it.Now you can set you dynamic font with a new size, Then it will be saved.  :o :o

Antares88

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 35
    • View Profile
Re: Dynamic Font package for NGUI 2.5.1 (for unity 4.x)
« Reply #20 on: April 13, 2013, 02:44:29 AM »
Hi!
First of all I'd like to thank you for this job. Using bitmap fonts was a pain in the ass :D

I had a little issue though: I made a label, the text is showing correctly but it's initially rendered in the back of everything, like if the label was under everything else.
 
I managed to bring it in front touching the Z transform and inserting a negative value. Why the depth is not working ?
When i try to modify it i get this warning: "the widgets underneath this panel are using more than one atlas. You may need to adjust transform position's Z value instead.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile

ameno

  • Guest
Re: Dynamic Font package for NGUI 2.5.1 (for unity 4.x)
« Reply #22 on: April 15, 2013, 09:00:41 AM »
Hi there, I got a annoying problem when using the dynamic font.
1. I have one main menu button panel with text on each button (start, options, credits).
2. I have another options panel, with a UITexture background. When I bring this panel up, the font of my button appear in front of my UITexture background of my new panel. I have tried to move the Z axis, value of -1, -5, -100, -200 to bring further forward the panel to the camera, but that doesn't work. I have always my main menu button font text on the front of my UITexture options background.
3. If I changed my dynamic font to a BMFont, the font appear correctly in the back of my UITexture.

Any hints to fix that ? I want to use the dynamic font, not the BMFont.
Thank you.

p.s. The problem is from the UITexture script, if I use UISprite instead, this fix the problem.
« Last Edit: April 15, 2013, 09:17:38 AM by ameno »

hmnyari

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 29
    • View Profile
I have a solution
« Reply #23 on: April 15, 2013, 10:18:50 PM »
Const Offset: default the text's y offset is not correct(still no solution yet), and this value can be different for different fonts. You can adjust this value to fit the texts in box, other sizes of the same font will mostly be correct.

this const offset value not saved
when open unity, value becomes 0

but I found solution 
go to font importer and change font size what you want.(not 1)
I think const offset is Unnecessary.   

garrynewman

  • Guest
Re: Dynamic Font package for NGUI 2.5.1 (for unity 4.x)
« Reply #24 on: April 18, 2013, 09:40:15 AM »
This solved all my problems! Thanks!

I was having problems with the kerning being all over the place on fonts I was generating. This gets rid of that problem.. and allows for unicode without any issues too!

http://i.imm.io/13eLX.png

badawe

  • Jr. Member
  • **
  • Thank You
  • -Given: 8
  • -Receive: 7
  • Posts: 70
    • View Profile
Re: Dynamic Font package for NGUI 2.5.1 (for unity 4.x)
« Reply #25 on: April 18, 2013, 03:06:36 PM »
GREAT JOB =D

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic Font package for NGUI 2.5.1 (for unity 4.x)
« Reply #26 on: April 19, 2013, 06:28:50 PM »
2.6.0 is out to Pro users and has dynamic font support.

jarjin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: Dynamic Font package for NGUI 2.5.1 (for unity 4.x)
« Reply #27 on: April 19, 2013, 08:35:59 PM »
2.6.0 is out to Pro users and has dynamic font support.
When can we download?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic Font package for NGUI 2.5.1 (for unity 4.x)
« Reply #28 on: April 19, 2013, 11:02:31 PM »
When Pro users say that it's all peachy and there aren't any issues. :)

Antares88

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 35
    • View Profile
Re: Dynamic Font package for NGUI 2.5.1 (for unity 4.x)
« Reply #29 on: April 23, 2013, 03:30:43 AM »
do we have to remove the files of this library before updating to ngui 2.6 ?

if yes, what files ?