flash 判断是否含有这个字体

import flash.text.TextField;
import flash.text.TextFormat;

var t:TextField = new TextField();
t.defaultTextFormat = new TextFormat("微软雅黑",20);
t.text="中文";
t.autoSize = "left";
trace(t.height);
addChild(t);
var ta:TextField = new TextField();
ta.defaultTextFormat = new TextFormat("宋体",20);
ta.text="中文";
ta.autoSize = "left";

trace(ta.height);

------------》

因有时有的客户端认中文,有的客户端认英文 所以像这样以高判断就不会出找不到字体的问题了

找不到中文找英文。

arguments
获取 函数 参数数量
获取 函数自身引用

flash TextField HTML文本 字体还会用FlashCS设置的。

原文地址:https://www.cnblogs.com/mattins/p/3023147.html