Create Font SWFs easily in FDT

I created an ANT build file which lets you create font SWFs easily, it takes a class template as input, generates the actual class for the chosen font and compiles the corresponding swf. but enough talking … give it a try.

Download:

fontcreator.zip

Setup:

  • import the zip file via “Import > Existing Projects.. > Select archive file”
  • add flash nature: AS3, Flex 3/4 SDK
  • run the ant build (don’t forget to select “Run in the same JRE as the workspace” in External Tools > JRE)

Steps:

select class template (you can create an own class template, save it in the template directory und select it here)

select font file (has to be in the assets/fonts directory)

specify a class name for your font class

the name for the font (thats the name you’ll use with TextFormat.font later on)

font weight

font style

mime type, normally ‘application/x-font’ should do the job

specifiy the chars to want to embed

 

That’s it. Now your font should get generated and afterwards be available in the deploy/fonts directory.



13 Responses (Add Your Comment)

  1. Danke für dein HowTo :)

  2. Holy crap! An Ant task to aspire to….

  3. what’s short for PDT

  4. @yunzhong: What do you mean?

    Maybe what FDT stands for? In this case: http://fdt.powerflasher.de

  5. brilliant, as always ;)
    thanks for beeing patient with my font-misspelling problem ;)

  6. This will be a very handy tool. I am currently getting the error:

    BUILD FAILED
    /Users/dr/Documents/workspace/fontcreator/build.xml:86: java.lang.RuntimeException: Error during compiling!

    Has anyone seen this when trying this ant script. I tried removing and re-adding the flash nature to no avail.

  7. just a quick note for the fix. You will need to create the deploy/fonts folder in your project. Simple enough fix, this is great. thank you.

  8. I get the error:
    Buildfile: D:\ProjectWork\fontcreator\build.xml
    1. input:
    2. create class file:
    3. compile font:

    BUILD FAILED
    D:\ProjectWork\fontcreator\build.xml:86: Problem: failed to create task or type fdt.launch.application
    Cause: The name is undefined.
    Action: Check the spelling.
    Action: Check that any custom tasks/types have been declared.
    Action: Check that any / declarations have taken place.

    Total time: 6 seconds

    Any ideas to why?

    Thanks :)

  9. Tom’s problem was that he didn’t select “Run in the same JRE as the workspace” in External Tools > JRE

  10. there is a problem with import from zip in the newer fdt versions.

    fdt cant find the linked SWCs.

    Fix 1: change them in as3_classpath
    Fix 2: unzip the project and copy the folders manually in a seupted fdt flash project

Trackbacks:

Leave a Reply

Formatting: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Other Entries

About

Martin Rädlinger is an Interactive Developer & Designer. He specializes in interactive coding predominantly with ActionScript, but every new challenge is welcome. If you like his work feel free to get in touch with him. At the moment he's available for freelance work.

Contact

Martin Rädlinger
mail: mr [at] formatlos.de
web: www.formatlos.de
xing: Martin Rädlinger
linkedin: Martin Rädlinger
skype: martinraedlinger