cccicl
cccicl
发布于 4天前

ActionScript 3 在FlashDevelop中嵌入truetype字体(Flex 4+)

[Embed(source='C:/WINDOWS/Fonts/verdana.ttf', fontFamily="Verdana", fontWeight="regular", embedAsCFF="false")]
public var Verdana:Class;

private var mytextfield:TextField = new TextField();
private var mytextformat:TextFormat = new TextFormat();

/*
... class declaration ...
*/

mytextformat.font = "Verdana";

mytextfield.embedFonts = true;
mytextfield.defaultTextFormat = mytextformat;

相关文章