MMD Technical Study
Nic Mulvaney - Huddersfield University 2004
Building The Application (Part 1)
March 9, 2004 (433 Words)

After already building the plotting procedure, today I started looking at the open/save functionality of the project. Once I get this done, I can have a bit more fun with the effects. I've decided to scrap the PHP method (it was just temporary anyway) as I'd rather it didn't depend on too many components. Instead I thought I would do file 'stripping' in flash, regardless of speed. I'm currently using a small program called Flash Studio Pro (FSP), which wraps around Flash SWF files giving them more functionality as stand-alone applications. I currently use version 1.9.9, but will be purchasing version 2 very soon. FSP allows me to run TTX (A DOS utility written in Python) from within flash, and because it is a DOS utility, I can pass it variables and run it silently and seamlessly.

TTX converts .ttf (TrueType fonts, usable on Win/Mac systems) and .otf (OpenType° fonts, even better, usable on Win/Mac systems) into .ttx files which are basically XML files. I found that TTX generates a very large file (500KB+) when all I need is a fraction of that data for the outlines. But to be able to convert the file back into a font, I do need all that data. This is a bit of a problem. Somehow I would have to save all the unused data and stitch it back together with the edited outlines. TTX has a number of options that I began to play with in order to find a solution for this.


TTX Screen-shot
(TTX Screen-shot)

Immediately I spotted -m (Merge), so i thought maybe I can merge the outline data I have with a full data font. But it just kept blowing up with errors and the font was un-open-able (would actually shut down Fontlab when I tried to open it). Ahh but -s (Split) is the thing I wanted. This split the original .ttf font into 18 separate files, only one of which was the outline table I required, named glyf. This file was still 300KB, but nevermind, it's a more functional file for me to deal with. As long as I can load this in and out of flash in a reasonable state, then it will build back into a font with TTX.


So... here is a quick sketch of the system I am working on


TTX Screen-shot

I haven't joined all these things into a single application yet. I have them all working individually but I don't want to rush at the moment, because mistakes may mean a lot of back tracking. There still may be a more efficient way.

Next Page... "Building The Application (Part 2)" »




Comments

hi nic..
just wondering if it would be possible if you could just click a link to download the file, rather than email??

or giving them an option??

Posted by: simon at March 17, 2004 01:08 AM


Hey Simon, Yeh it could be downloaded if it was on a website, at the moment I'm concentrating on the installation piece as a standalone executable. Because if you created a font at the final show, you wouldn't have anything to download it onto, so I'm thinking it would be easier to email it to yourself.

Posted by: Nic at March 17, 2004 04:48 PM