Creating a TextFlow Configuration object


/ Published in: ActionScript 3
Save to your folder(s)

The FontsManager class has embedded fonts in it. This is not a TLF class.


Copy this code and paste it in your HTML
  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);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.