Embed system fonts with Flex SDK
Posted on 6th March 2010 in ActionScript | 1 Comment »
This little ActionScript 3 snippet will convert the system font to a SWF font instance that you can use in your AS3 project.
Compared to the bugloaded madness of embedding a font in Flash CS3, Flex SDK (in combination with Eclipse Platform and AXDT for instance) really makes it easy with a following ActionScript snippet:
package { import flash.display.Sprite; public class Impact extends Sprite { [Embed(systemFont='Impact', fontName='Impact', mimeType='application/x-font')] public static var Impact:Class; } } |
As can be told from the above ActionScript code, it will embed a font called Impact.
Related resources:
- Eclipse Platform
- AXDT – set of Open Source plugins for AS3/MXML support on Eclipse
- Flex SDK open source framework for building and maintaining expressive web applications
- Enhance the ugly Eclipse icon on your Dock


One Response
[...] Embed system fonts with Flex SDK [...]