AS3字体SWF示例
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了AS3字体SWF示例相关的知识,希望对你有一定的参考价值。
This font SWF was created using the handy tool FontSwffer (http://blog.madebypi.co.uk/2011/02/28/fontswffer-1-1/)
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;
以上是关于AS3字体SWF示例的主要内容,如果未能解决你的问题,请参考以下文章
AS3:如何在外部 swf 上的文本字段中使用 Android 默认字体?