# Formatting text with font SWF and CSS files

**URL:** <https://forum.kirupa.com/t/formatting-text-with-font-swf-and-css-files/313103>\
**Category:** flash\
**Created:** [August 20, 2010, 2:20am UTC](https://forum.kirupa.com/t/formatting-text-with-font-swf-and-css-files/313103 "2010-08-20T02:20:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nhilez](https://avatars.discourse-cdn.com/v4/letter/n/51bf81/32.png) [@nhilez](https://forum.kirupa.com/u/nhilez)\
**Post date:** [August 20, 2010, 2:20am UTC](https://forum.kirupa.com/t/formatting-text-with-font-swf-and-css-files/313103/1 "2010-08-20T02:20:34Z")

</div>

I need to populate a dynamic text field with data from an XML file. The data looks like this:

```auto
<headline2 width="500">
<![CDATA[<span class="Headline">you <span class="boldHeadline">ca</span>n</span>]]> 
</headline2>

```

The span classes “Headline” and “boldHeadline” come from a CSS file:

```auto
.Headline {
 font-family: "CA Sans";
 font-size:38; 
 color:#FFFFFF;
}
 
.boldHeadline
{
 font-family: "CA Sans Bold";
 font-size: 38px;
}

```

So basically I need to load a font from a SWF file, then parse a CSS file and get the correct entries for the text field, then assign those entries to the text being pushed to that text field. I have the external SWF files for the fonts and am loading those files. How do I do the rest?
