Problem:
How to get Dynamically Loaded Embedded Font Swfs from a Stylesheet to 
display correctly when using it in a Flex TextArea component that is 
reading Multi-Formatted HTML Text?

Solution:
Step 1: Create a swf file for each Font you want, with a text sample 
of the Font on stage and whatever characters embedded.
Step 2: Add the fonts as a font-face in a .css StyleSheet, which can 
be loaded dynamically in the Flex application.
Step 3: Create a style name containing all the fonts needed , for 
example:

.subPageFontStyles
{
  font-family: "Bello Pro";
  font-size: 28px;
  color: #7E1A7B;
  
  font-family: "Arial Rounded MT Bold";
  font-size: 15px;
  color: #302F00;
}

Step 4: In the TextArea Flex component, set "styleName" to the font 
style name in the StyleSheet, for example "subPageFontStyles".
Step 5:  In the HTML Text File, for each text block set the "font 
face" tag to font-family specified in the style name from the .css 
Stylesheet, for example "Bello Pro".  

Notes: 
-You have the option to change font size and color tags in the HTML 
Text.
-Make sure to use the  HTML Text property of the Text Area Flex 
component to set the HTML Text.
-Make sure to recompile the .css Stylesheet file into a .swf file if 
it is being loaded dynamically.


Reply via email to