Skip to main content
April 7, 2010
Question

Using a default font for text?

  • April 7, 2010
  • 1 reply
  • 478 views

Is there a way on a TextFlow object to assign a default font to any text that does not have a font specified?

For instance, if the text elements are not wrapped in a font tag, or its ancestor tags are not wrapped in a font tag, to set that text to be a certain font?

<p>This is an unstyled sentence.</p> <!-- I want to style this text with default font -->

<p><font face="Arial" size="12">This is a styled sentence.</p> <!-- but not this one, since it already has a font -->

Any ideas?

Thanks.

This topic has been closed for replies.

1 reply

Participating Frequently
April 8, 2010

You can set inheriting formats like the font on the TextFlow itself. Then any FlowElements within the TextFlow will inherit those formats unless they override them.

Gordon Smith

Adobe Flex SDK Team