在flashas3中嵌入抗锯齿字体

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在flashas3中嵌入抗锯齿字体相关的知识,希望对你有一定的参考价值。

  1. // To use this method you must embed and "Export for AS" the font in the Flash IDE (eg. Flash CS3, Flash CS4).
  2. // You Can do this by clicking the menu on the library panel, then go "New Font"
  3. // Then select "Export for Actionscript, and give your font class name.
  4. // The class name is the name that you will reference on the line directly below this.
  5.  
  6. var myFont = new MyFontClassName();
  7.  
  8. var myFormat:TextFormat = new TextFormat();
  9. myFormat.size = 40;
  10. myFormat.font = myFont.fontName;
  11.  
  12. var myText:TextField = new TextField();
  13. myText.defaultTextFormat = myFormat;
  14. myText.embedFonts = true;
  15. myText.antiAliasType = AntiAliasType.ADVANCED;
  16. myText.autoSize = "left";
  17. myText.text = "Here is some pretty that is anti-aliased!";
  18. addChild(myText);

以上是关于在flashas3中嵌入抗锯齿字体的主要内容,如果未能解决你的问题,请参考以下文章

在 QtQuick Text 元素中禁用字体抗锯齿

防止 TrueType 字体的抗锯齿(或子像素渲染)

如何在 Windows 中启用字体抗锯齿 [关闭]

在 IE9 中禁用 Cleartype(文本抗锯齿)

文本抗锯齿和字体平滑

emWin6.x抗锯齿