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

mavriel

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Dynamic font support for NGUI
« Reply #60 on: January 21, 2013, 11:28:28 PM »
thanks for ink‘s help, I know the solution of my problem mentioned before.

New problem!!!!The Character became thin.It indeedly became thin.(It seems the all the shaders for dynamic font will make the printed character thin)
Please help me!Any help will be appreciated^_^

I think shade code has some problem.
If use this shader, font's edge is black.
In dark background, text is thin. In light background, text seems strange.


I fix it as follows. But i don't know this is right.


tex2D(_MainTex, IN.texcoord).a * IN.color;
-->
half4 col = IN.color;
col.a *= tex2D(_MainTex, IN.texcoord).a;


« Last Edit: January 21, 2013, 11:30:58 PM by mavriel »

jarjin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: Dynamic font support for NGUI
« Reply #61 on: January 23, 2013, 07:09:21 AM »
For Chinese character no effect, still thin.

schuberbia

  • Guest
Re: Dynamic font support for NGUI
« Reply #62 on: January 25, 2013, 03:28:51 PM »
Here's an evil question, anyone have any idea if we can get kerning with this dynamic font solution?

PoN

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 111
    • View Profile
Re: Dynamic font support for NGUI
« Reply #63 on: January 28, 2013, 02:20:48 AM »
after update NGUI to 2.3.1 ,working not properly.
Worked on Doc&DogAge Of Fury 3D. Actually working on WarMach.

fantast_xu

  • Guest
Re: Dynamic font support for NGUI
« Reply #64 on: January 28, 2013, 10:26:29 PM »
Yeap, after updated to 2.3.1, there are some compile error when I import DynamicFont.unitypackage

realblues

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: Dynamic font support for NGUI
« Reply #65 on: January 28, 2013, 10:36:31 PM »
Yeap, after updated to 2.3.1, there are some compile error when I import DynamicFont.unitypackage
Is the Package Released?

fantast_xu

  • Guest
Re: Dynamic font support for NGUI
« Reply #66 on: January 28, 2013, 10:43:01 PM »
You can download from this thread. Second page by unisip  8)

Hidden

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: Dynamic font support for NGUI
« Reply #67 on: January 29, 2013, 10:43:24 AM »
Could this also be used to generate non dynamic fonts directly in unity? Save out the font texture to use as a sprite and the kerning info so it can be put into the Atlas like a normal font out of BMFont?

The font textures seem crisp (better than the results I've had with BMFont) and it would be great to be able to do it all within unity and only use 1 atlas.

Kichang Kim

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: Dynamic font support for NGUI
« Reply #68 on: January 29, 2013, 07:48:21 PM »
Is this patch support NGUI 2.3.1 ? It seems to does not work in 2.3.1.

lingying

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Re: Dynamic font support for NGUI
« Reply #69 on: January 30, 2013, 09:55:19 PM »
Thanks author very much!
And I modify the source files for NGUI 2.3.1.
Just try it

minevr

  • Guest
Re: Dynamic font support for NGUI
« Reply #70 on: January 31, 2013, 04:42:42 AM »
你好,lingying,欢迎加入UnityQQ群:2453819

fgame

  • Guest
Re: Dynamic font support for NGUI
« Reply #71 on: February 01, 2013, 03:07:02 AM »
Assets/NGUI/Scripts/UI/UIFont.cs(28,30): error CS1061: Type `UnityEngine.Font' does not contain a definition for `textureRebuildCallback' and no extension method `textureRebuildCallback' of type `UnityEngine.Font' could be found (are you missing a using directive or an assembly reference?)

"Assets/NGUI/Scripts/UI/UIFont.cs(499,13): error CS0246: The type or namespace name `CharacterInfo' could not be found. Are you missing a using directive or an assembly reference?"



有错误哇, 我用的是 Unity3.5.5

Got Error!! I am using Unity3.5.5

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Dynamic font support for NGUI
« Reply #72 on: February 01, 2013, 04:05:26 AM »
fgame: use unity 4.0.1.

iamslash

  • Guest
Re: Dynamic font support for NGUI
« Reply #73 on: February 05, 2013, 01:07:58 AM »
I made somehing using ngui dynamic font patch.
I could find out that it worked well on SAMSUNG galaxy S3.
But In case of LG optimus LTE it didn't work well.
It was rendered half on LG optimus LTE.

So I made some code using dynamic font without NGUI.
It worked well on LG optimus LTE.
But It didn't worked well with UILabel of NGUI.
In case of SKY Vega racer it didn't worked well like LG optimus LTE.
I found out that the cpus of those devices are made by qualcomm.

Qualcomm Snapdragon S4 Plus MSM8960
Qualcomm MSM8260

They all use adreno GPU.
It seems that NGUI dynamic font is not rendered well on the mobile device which has adreno GPU.

How can I start to modify the code ?

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Dynamic font support for NGUI
« Reply #74 on: February 05, 2013, 04:52:19 AM »
Adreno also had problems with Hard Clipping - it just crashed on that. Maybe, the dynamic text is using something similar as the hard clip shader did? If I recall it was the Clip function.