4 Replies Latest reply on Sep 26, 2006 3:07 PM by FursterateTom

    How do you get text to render like you want?

    FursterateTom
      I have yet to figure out how to go about getting my text to look like it should. I looks fine in development but when I go to run the application it goes crazy. How do any of you go about rendering a good deal of text in Flex?


      Tom
        • 1. Re: How do you get text to render like you want?
          mac_martine Level 1
          Do you have a small example of what you are referring to? Are you using embedded fonts?
          • 2. Re: How do you get text to render like you want?
            FursterateTom Level 1

            Here is part of the css

            .Header2{

            fontWeight:"bold";
            fontSize:14;
            color:#000000;
            text-align:center;
            padding-left:30;
            padding-right:30;

            }

            .Header3{

            fontWeight:"bold";
            fontSize:12;
            color:#000000;
            padding-left:30;
            padding-right:30;

            }

            .SalesText{

            fontSize:10;
            color:#000000;
            padding-left:30;
            padding-right:30;
            text-align:left;
            text-indent:0;

            }


            Here is part of the code:

            <mx:TextArea styleName="Header2" width="400" height="45" verticalScrollPolicy="off"
            borderStyle="none">
            <mx:htmlText>
            <![CDATA[
            Custom Tailored Finance Options <br>That Fit Like a Glove!

            ]]>
            </mx:htmlText>

            </mx:TextArea>

            <mx:TextArea styleName="SalesText" width="399" height="153"
            borderStyle="none" verticalScrollPolicy="off">
            <mx:htmlText>
            <![CDATA[
            Everyone deserves a home to call their own. Unfortunately,
            most traditional banks do not feel the same. The problem
            lies in the “Unforgiving” guidelines they impose to determine
            who’s qualified. These rigid guidelines are almost are almost
            impossible for the average American family to meet. Here we
            understand there are bumps and setbacks along life’s highway.
            If you are one of the many hard working families who have been
            forced to put your dream of home ownership on hold by banks…
            Help is now available

            ]]>
            </mx:htmlText>

            </mx:TextArea>


            It looks exactly the way I want it to when I am developing it. All of the alignment is off when I run the application. I am not using embedded fonts.
            • 3. Re: How do you get text to render like you want?
              mac_martine Level 1
              I only noticed a difference in the first textArea which went away when I added condenseWhite="true" to it. That makes the textArea ignore all the extra lines breaks and white space in yout htmlText.
              Does that solve your problem? If not, let us know specifically what's going on or maybe supply screenshots.
              • 4. Re: How do you get text to render like you want?
                FursterateTom Level 1
                Thanks Mac.

                It works now. I set the condensedWhite and I also got rid of my <p> tags and everything it finally looking the way it should.


                Much appreciated.


                Thomas