0 Replies Latest reply on Sep 29, 2009 8:59 AM by michael nieuwenhuizen

    <font size= ... in htmlText

    michael nieuwenhuizen

      I've stumbled upon some bizarre behaviour in my htmlText.  Say I have the following code:

       

           var str:String = '<font face="Helvetica" size="20">Ipsum  Lorem</font><p>In rhoncus lobortis pellentesque. Aenean aliquam est  ac lacus imperdiet     placerat. Aenean sodales leo in eros hendrerit nec  consectetur nisl porttitor. Suspendisse potenti. Vivamus rutrum varius pretium.  Donec ac iaculis arcu. Morbi porta vestibulum neque, sed volutpat mauris posuere  in. Cum sociis natoque penatibus et magnis dis parturient  </p>';
          var  myText:Text = new Text();
          myText.width =  400;
           myText.htmlText = str;
           this.addChild(myText);

      It shows up like this:

      htmltext.jpg

      First of all, shouldn't the <p>In rhoncus lobortis... start on a new line because of the <p> tag?

      And secondly: where does the blank line come from?  If I ad multiple paragraphs they ALL have an extra blank line before the last line.  And the bizarre thing is, if I get rid of the size="20" from the <font> tag, the blank line disappears.  How does that happen?!