ActionScript 3 AS3示例字体SWF
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ActionScript 3 AS3示例字体SWF相关的知识,希望对你有一定的参考价值。
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;
以上是关于ActionScript 3 AS3示例字体SWF的主要内容,如果未能解决你的问题,请参考以下文章
ActionScript 3 AS3 SWF元数据
ActionScript 3 AS3 SWFtrospection(as3swf)
ActionScript 3 AS3加载SWF文件跨域
ActionScript 3 AS3从URL加载外部SWF
ActionScript 3 AS3加载和显示外部SWF文件
AS3字体SWF示例