1 Reply Latest reply on Sep 13, 2009 5:07 AM by rdiur

    Fonts, css stylesheets and htmlText


      I have a problem with using Myriad fonts with TextArea or any other htmlText interpreting widget. Myriad regular contains no bold set, and I have no way I can assign Myriad semibold to a <b> tag in the html.  I tried subclassing TextArea, and setting the style sheet, but it seems you can only set certain tags. I can set an <a> , <body>, or <p>, but not <b> or <i>. How do I go about doing this? Or is there a simpler solution concerning  importing fonts? (is ther a way to joine font weight classes into one?)



      package {
          import flash.display.Sprite;
          import flash.text.StyleSheet;
          import mx.controls.TextArea;


          public class TextAreaEx extends TextArea {


              public function TextAreaEx() {
                  var style:StyleSheet = new StyleSheet();


                  var heading:Object = new Object();
                  heading.fontWeight = "bold";
                  heading.color = "#FF0000";


                  var body:Object = new Object();
                  body.textDecoration = "underline";


                  style.setStyle(".heading", heading);
                  style.setStyle("a", body);


                 styleSheet = style;