/ Published in: ActionScript 3
This font SWF was created using the handy tool FontSwffer (http://blog.madebypi.co.uk/2011/02/28/fontswffer-1-1/)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
package { import flash.display.Sprite; public class FontSWF extends Sprite { [Embed(source = "arial.ttf", fontName = "ArialRegular", fontStyle = "normal", fontWeight = "normal", unicodeRange = "U+0020-003C,U+003E-007E,U+00A0,U+00A3,U+00A9,U+00AC,U+00AE,U+00BA,U+2013,U+2018-2019,U+201C-201D,U+20AC", mimeType = "application/x-font", advancedAntiAliasing = true ,embedAsCFF=false)] public static var ArialRegular_normal_normal:Class; [Embed(source = "arialbd.ttf", fontName = "ArialBold", fontStyle = "normal", fontWeight = "bold", unicodeRange = "U+0020-003C,U+003E-007E,U+00A0,U+00A3,U+00A9,U+00AC,U+00AE,U+00BA,U+2013,U+2018-2019,U+201C-201D,U+20AC", mimeType = "application/x-font", advancedAntiAliasing = true ,embedAsCFF=false)] public static var ArialBold_bold_normal:Class; } } // Handy URLs ... // http://blog.madebypi.co.uk/2011/02/28/fontswffer-1-1/ // http://nochump.com/blog/archives/20 // http://www.tillschneidereit.de/unicode_range_tool.html // http://yourpalmark.com/2009/04/05/embedding-fonts-using-external-swf-files/ // http://blog.flexexamples.com/2007/10/25/embedding-fonts-from-a-flash-swf-file-into-a-flex-application/ // If you want to point to a relative folder you can do something like this ... // [Embed(source = "../assets/fonts/arial.ttf", fontName = "ArialRegular", fontWeight = "normal", mimeType = "application/x-font-truetype")] // private static var ARIAL_REGULAR_FONT:String;