在Flex3上的AS3中嵌入字体

Posted

tags:

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

This describes how to embed font in to Flex(mxml) file without using the tag (fully AS3).
  1. [Embed(source='assets/CALIBRII.TTF', fontName='fontCalibri', fontStyle='italic', fontWeight='light', mimeType='application/x-font')]
  2.  
  3.  
  4. textFormat = new TextFormat();
  5. textFormat.color = 0xFFFFFF;
  6. textFormat.font = "fontCalibri";
  7. textFormat.size = 11;
  8.  
  9. textField = new TextField();
  10. textField.embedFonts = true;
  11. textField.text = "Embeded Text";
  12. textField.selectable = false;
  13. textField.background = true;
  14. textField.multiline = false;
  15. textField.backgroundColor = 0x000000;
  16. textField.setTextFormat(this.textFormat);

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

为 AS3 嵌入字体。如何?

ActionScript 3 在AS3中嵌入字体 - 资产类

ActionScript 3 AS3在Flex中嵌入系统字体

ActionScript 3 在Flash AS3中嵌入抗锯齿字体

AS3在Flex中嵌入系统字体

AS3在flexsdk中嵌入字体