Displaying a bold font style on a TextBox control in Flex Gumbo

The following example shows how you can specify a bold font style on a device and embedded font on a Flex Gumbo TextBox control by setting the fontWeight style.
Full code after the jump.

To use the following code, you must have Flash Player 10 and a Flex Gumbo SDK installed in your Flex Builder 3. For more information on downloading and installing the Gumbo SDK into Flex Builder 3, see “Using the beta Gumbo SDK in Flex Builder 3”.

View MXML

<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/12/12/displaying-a-bold-font-style-on-a-textbox-control-in-flex-gumbo/ -->
<Application name="TextBox_fontWeight_test"
        xmlns="http://ns.adobe.com/mxml/2009"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white">

    <Style>
        @font-face {
            src: url("C:/Windows/Fonts/ARIALBD.TTF");
            fontFamily: "ArialEmbedded";
            fontWeight: "bold";
            cff: true;
        }
    </Style>

    <VGroup>
        <TextBox id="deviceTextBox"
                text="The quick brown fox jumps over the lazy dog. (device)"
                fontFamily="Arial"
                fontWeight="bold"
                fontLookup="device" />

        <TextBox id="embeddedCFFTextBox"
                text="The quick brown fox jumps over the lazy dog. (embeddedCFF)"
                fontFamily="ArialEmbedded"
                fontWeight="bold"
                fontLookup="embeddedCFF"/>
    </VGroup>

</Application>