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

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Dynamic Fonts v2.6.0
« on: April 20, 2013, 10:27:43 AM »
I just update to the latest version and continue having issues with dynamic fonts.


1] I created and empty gameobject (with reset values), drag and drop UIFont.cs into it.
2] Set Font Type to Dynamic
3] Drag and drop the TTF, set the scale. (I can't set the material, it use the TTF one)


Until then everything is ok, but in game, sometimes looks corrupt (image attached).


There's another way to create Dynamic Font?


Thanks!

dlewis

  • Guest
Re: Dynamic Fonts v2.6.0
« Reply #1 on: April 20, 2013, 06:21:30 PM »
I find that happens (in another dynamic font package I use) when the texture gets rebuilt. When that happens, every label needs to rebuild it's geometry/update it's uv's, looks like the same issue here.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #2 on: April 21, 2013, 07:21:34 PM »
Why are you creating a game object and putting UIFont on it? Use the Font Maker.

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #3 on: April 22, 2013, 07:43:08 AM »
Why are you creating a game object and putting UIFont on it? Use the Font Maker.
In the Font Maker I just see texture font option. Asking for Font Data (.txt) and the Texture.
How I create a dynamic font from there? I was using the old way with empty gameobjects.




ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #4 on: April 22, 2013, 01:42:38 PM »
If you don't see dynamic font creation option then you don't have 2.6.0.

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #5 on: April 22, 2013, 02:08:27 PM »
The package it says 2.6.0, even the readme.txt file it has 2.6.0 on it.
So, I supposed it was the last version.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #6 on: April 22, 2013, 04:43:49 PM »
What package? Pro doesn't come in package form. Pull the latest changes from the repository.

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #7 on: April 22, 2013, 05:15:39 PM »
What package? Pro doesn't come in package form. Pull the latest changes from the repository.
I got the zip file (ArenMook-ngui-b03b43981ccb.zip) from the repository last Saturday.
I should get a new version?


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #8 on: April 22, 2013, 05:26:37 PM »
Commit da2dc78:
https://bitbucket.org/ArenMook/ngui/commits/da2dc78261bd99b3beef1f5f5341adfd356a5317
Quote
- FIX: Font Maker now supports creation of dynamic fonts.

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #9 on: April 23, 2013, 08:01:20 AM »
Thank you!
I'm going to try it now.

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #10 on: April 23, 2013, 04:53:16 PM »
Nice, it's working!
There's a way to replace my old fonts? because change hand by hand each label it's a lot of work.


agrignon

  • Guest
Re: Dynamic Fonts v2.6.0
« Reply #11 on: April 24, 2013, 05:58:36 AM »
I've updated to 2.6 and recreated my dynamic fonts with the font maker. I have 3 typefaces, and in the sim all works perfectly. When I build and deploy on device (iPad HD w/thunderbolt) however, I only get one of them showing up - it's always the same one. The others don't show gibberish, they're just empty. Any suggestions?

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #12 on: April 24, 2013, 08:04:10 AM »
Did you check the Z depth?  sometimes you need to move it closer to the camera. Somehow it works only moving 1 text closer (Z = -10).
At least that works for me, but I need to chaaaange aaaaall the text in game now... well, at least the upgrade worth it.

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #13 on: April 24, 2013, 09:25:52 AM »
I continue having corrupt text in game.
I just deleted the old dynamic fonts and created new ones. I put the new ones in each Label an in the Scene looks great, but playing the game and changing menus the text corrupts and looks like the image attached in the first post.

Also, like Agrignon sometimes the text dissapear, like randomly.

Aren we need your help, please!

PS: another thing it's \n is not working in the UILabel area text, now it recognize it like plain text.


PS2: This could be a material problem? what about let people change the material? now it doesn't.
« Last Edit: April 24, 2013, 10:41:44 AM by jeldrez »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic Fonts v2.6.0
« Reply #14 on: April 24, 2013, 12:37:37 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).

Corrupt font? Need repro steps for that.

\n in the text area -- why have it there? Just press Enter to create a new line.