views:

42

answers:

1

I've searched high and low for an answer and it might be a foolish endeavour but i'd like to be able to read fonts from a directory at runtime for use in an actionscript/flex app

Ive seen the answers on the web and all rely on putting fonts in external swfs and certainly rely on embed meta tags or styles when i'd like a local fonts directory to be able to be used, its not too user friendly asking a user to compile their own swfs to use the app

The only answer I can see is to have a server running mxmlc and creating .mxml files with embed tags every time a user wants to update their fonts and recompiling the app when needed but its a bit much, is this the only feasible answer? Thankyou for your time

A: 

Adobe has a new library called TLF - though it's built into Flex 4, you can easily import the library SWCs into your 3.x SDK. It's extremely powerful for all things text, and it allows use of all the fonts on a user's computer that are located in their system's font directory (i.e. C:\Windows\fonts)

Here's a link to Adobe's page on it (with downloads and install instructions):

http://labs.adobe.com/technologies/textlayout/

...and here is a demo app that they cooked up for it (showing it reading your device fonts on the right):

http://labs.adobe.com/technologies/textlayout/demos/

There is a bit of a learning curve using it, but once you do, it's really hard to go back to a text box.

I hope that helps!

PIM