How can I convert an uploaded font to a swf?

Posted on 2011-10-26
Last Modified: 2012-05-12
Hi all,

In a nutshell, I need to allow users to upload their own fonts to my Flash-based design program.

What I CAN do so far:
--Create an .as file with a Flex Embed meta tag with a class that registers the Font
--Execute mxmlc against the .as file to create a SWF font library file (this is done locally at the command line, and requires the Flex SDK and the Java SDK)
--Load the font library SWF into another SWF flash and embed the font in a textField
--Upload the True Type font files to the IIS server

What I WISH I could do:
--Create the SWF file server-side from a TTF font file uploaded by the user
--Second best, create the SWF file client-side without requiring Flex/Java (ActiveX?)
     + I tried Font2SWF but can't seem to find a font class inside the gen'd SWF, just graphics
        on the stage.

Anybody know how to do this?

(I'm running on an IIS server and I use ASP. My main Flash app uses AS3.0.)

Question by:BlueKarana
    LVL 29

    Expert Comment


    Author Comment

    That is what I'm already doing. See above, "Execute mxmlc against the .as file to create a SWF font library file " mxmlc is an Apache Ant process.

    I want something that's doesn't require an install on the client's pc.

    Thanks, tho
    LVL 29

    Assisted Solution

    In this case you need to upload font file to your server and you will create SWF file.
    I am not sure you can find other options or ask your client to download
    and they will able to generate SWF using XML and asset files

    Accepted Solution

    Unfortunately swfmill only generates AS2 and I need AS3.

    I have decided to just have the customer send the ttf files in and our production people will generate the swf(s) with mxmlc on their local PC and upload them. We're going to create a VB front end (to collect data and use a batch file to run mxmlc) to make it easier for our people to do this with the hundreds of fonts they receive.
    LVL 29

    Expert Comment

    That is the best solution in your case and easier for customer to use

    Author Closing Comment

    Thanks, dgofman, for trying to help. I appreciate it. It's a tough problem with no ideal solution that I can see either.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
    I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
    In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
    The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now