FontGrabber (TTF/FNT fonts visualized as sprites) -unfinished project

I have implemented a (partially unoptimized) prototype solution for:

  1. Reading FNT font files (on simulator - so you have it for free on device)

  2. Saving a .lua spritesheet file from the FNT (on simulator)

  3. Saving a .spc info file for the chars spacing provided in .fnt (on simulator)

  4. Making a group of sprites that visualize the desired text (on device/simulator)

  5. Reading the .spc file to properly place the chars in order (on device/simulator)

I currently have stuck with task #5 and have no other ideas for proceeding with this. It may be a bug, or just some silly way of approaching it. I don’t have more time to invest on this, however the rest part of the approach (70-80% of the project) works wonderfully (both on simulator and device) and is very very promising for:

  1. Including whatever ttf or fnt fonts in your app (with tools like Hiero) as Cocos2d do!
  2. Exploiting a very cpu-efficient way to visualize and continuously updating text without sacrificing fps.
  3. Opening a *huge* window for cool text-effects that could easily make an app to seem very polished!

Is there anyone who is interested on helping with this?

I can provide the unfinished project here and help you understand my approach. What I ask for is:

  1. To return some help on finishing this.
  2. To agree on providing the finished code as a module for the whole community (under whatever username).

The ideal outcome would be a fully working prototype that Ansca could optimize (with an internal C++ font-oriented fnt2lua translator) and provide it as a part of the SDK.

Anyone willing to help? [import]uid: 7356 topic_id: 4393 reply_id: 304393[/import]

:slight_smile:

I surprisingly found a solution for task #5. It finally had to do with the width and height of a sprite, which are returned as those of the first frame for a sprite, no matter what clip is playing at the time.

I am going to continue working on this and share it as a module when it is finished. [import]uid: 7356 topic_id: 4393 reply_id: 13724[/import]

Hi, i found your post by searching a solution to implement fonts from this app, probably you will want to take a look http://renderhjs.net/shoebox/

Hi, i found your post by searching a solution to implement fonts from this app, probably you will want to take a look http://renderhjs.net/shoebox/