创建TextFlow配置对象

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了创建TextFlow配置对象相关的知识,希望对你有一定的参考价值。

The FontsManager class has embedded fonts in it. This is not a TLF class.
  1. config = Configuration(TextFlow.defaultConfiguration).clone();
  2.  
  3. var linkNormalFormat:TextLayoutFormat = new TextLayoutFormat();
  4. linkNormalFormat.color = 0x000000;
  5. var linkHoverFormat:TextLayoutFormat = new TextLayoutFormat();
  6. linkHoverFormat.color = 0x999999;
  7.  
  8. var defaultFormat:TextLayoutFormat = new TextLayoutFormat();
  9. defaultFormat.paddingTop = 6;
  10. defaultFormat.color = 0x333333;
  11. defaultFormat.textAlign = TextAlign.JUSTIFY;
  12. defaultFormat.textAlignLast = TextAlign.JUSTIFY;
  13. defaultFormat.fontSize = 10;
  14. defaultFormat.lineHeight = 12;
  15. defaultFormat.fontLookup = FontLookup.EMBEDDED_CFF;
  16. defaultFormat.typographicCase = TypographicCase.UPPERCASE;
  17. defaultFormat.renderingMode = RenderingMode.CFF;
  18. defaultFormat.fontFamily = FontsManager.NOVAMONO;
  19.  
  20. config.textFlowInitialFormat = defaultFormat;
  21. config.defaultLinkNormalFormat = linkNormalFormat;
  22. config.defaultLinkHoverFormat = linkHoverFormat;
  23. config.overflowPolicy = OverflowPolicy.FIT_DESCENDERS;
  24.  
  25. textFlow = new TextFlow(config);

以上是关于创建TextFlow配置对象的主要内容,如果未能解决你的问题,请参考以下文章

ActionScript 3 从TextFlow中删除所有FlowElement对象

检测文本何时进入TextFlow对象中ContainerController的结尾

检测文本何时进入TextFlow对象中ContainerController的结尾

ActionScript 3 检测文本何时在TextFlow对象中运行到ContainerController的末尾

ActionScript 3 检测文本何时在TextFlow对象中运行到ContainerController的末尾

JavaFX - 垂直居中TextFlow中的文本