Outlines and other Dynamic Text pimping
// March 8th, 2010 // Experiments
Trying to parse binary formats was on my to do list for quite a while. And recently I saw a cool little tool made in Haxe by Adnez that parses True Type Fonts, and exports the raw data to different formats. And you since you don’t have text outlines in Flash, I wanted to give it a shot.
So I looked up the TTF specifications and started reading those bytes. Due to time shortage it wasn’t a complete success. But I got some results and the cool thing about having the raw font data is that you can manipulate it:
But as you can see, it’s not really that fast or spectacular and my parser is not what you’d call complete or bug free (A lot of Fonts don’t work or are mapped wrong). I guess the important thing is that I learned that you don’t have to be afraid of parsing binary files. It’s not so hard as I thought.
But it took some time and effort, so I made an other example to fill this Blog post
(inspired by Japanese toy typography)
I added the source code, but I don’t recommend using it in a real project. There are more optimal ways to get those results. And there are definitely better TTF parsers out there like hxswfml (there is a swc you can use in Flash) or FontReader.
Source code with the two examples (without the fonts ): ttf_source
















Nice work Kris. As always : )
Love the Japanese Font Toy.
amazing stuff!!
This is awsome! Great stuff.
But it’s ridiculous that flash don’t support this kind of thing natively…
nice work. thanks for the links.
Really amazing! I was looking for such solution. Thanks!!