FontSwffer

Creating font-asset SWFs for Flash used to be a bit of a pain. But now, there's FontSwffer.

FontSwffer is an Air 2 native application for Windows and OSX that lets you configure, build, and preview your font SWFs all in one place. All you need to do is set-up the fonts you want to embed and press a button, that's pretty much it. If you just want the font embed ActionScript to use in your own work-flow, FontSwffer can create that for you too.

FontSwffer uses the Flex 4 SDK to compile your SWFs, just point it to the location of the SDK on your hard-drive and you're good to go.

Adding and setting up fonts is a fairly straight forward affair; the title bar on each font you add gives feedback on any required information, and all the buttons or inputs have tool-tips to guide you if you're unsure of their function.

The first four items in the glyph ranges list selector, the ones with names starting with a '-', are custom ranges that we find useful and work with regularly here at MadeByPi. The custom ranges are defined in the customRanges.xml in the application directory. Feel free to modify the existing ranges and add your own as required, the process is simplified by allowing input of ranges as glyphs rather than Unicode U+Hex ranges.

The rest of the available ranges are parsed directly from the flash-unicode-table.xml, a part of the Flex SDK. You can add multiple ranges by holding Ctrl to add a single item, or Shift to select ranges.

Once you have one or more fonts configured it's just a case of clicking the Build SWF or build Class button. If you're build a font SWF, assuming the compiler completes successfully, the resulting SWF will be loaded and displayed in the Font Previewer. When created, your font SWFs and/or classes will be saved to your desktop, in directory called "/FontSwffer_output".

The Font Previewer tool takes a compiled SWF (generated by FontSwffer) and displays the font(s) contained within, alerting you to any glyphs that were missing from the fonts when the TTF / OTF files were transcoded and embedded into the SWF.

By default, no code is added to the SWF to register the embedded font classes once it's loaded. This behaviour can be changed in the settings panel, where a few features can be configured. If you select to 'Auto-register fonts in generated classes'  - code will be added to register the fonts in the constructor of the SWF document class.

All changes to the application settings are saved and retained from one session to the next. The path to your Flex SDK is also stored once it has been configured successfully.

The lovely splash-screen and application icons were designed by the team here at MadeByPi and, along with looking nice, it lists some application details, and all the open-source code libraries used in the project.

That's about it. Download below, have fun making font SWFs, and feel free to feed back with suggestions or bug reports ;)

Update: v1.004

2 new actions in the glyph input area: Save yourself a bit of time with the new paste and clear buttons - paste in glyphs of your own :)

Increased UI font size and switched to use system fonts; Arial / Helvetica (_sans)

Update: v1.006

Changed fontName / className behavior to allow the items with the same fontName but different style/weight settings. Thanks to @turbohz for suggesting the improvement :)

Update: v1.0071

A little update that adds support for .ttc - TrueType Collection - font files.

Update: v1.0072

Fixed handling of non-relative paths to font assets when creating the embed metadata.

FontSwffer - win32 (exe)

FontSwffer - OSX (dmg)

and glyph-rangesthe