Skip to main content
Apr 7, 2010 12:45 PM UTC
Question

Using a default font for text?

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 is closed to new replies. Start a new post to keep the conversation going.

1 reply

Participating Frequently
Apr 8, 2010 5:37 PM UTC

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

Translate