1 Reply Latest reply on Mar 16, 2008 9:43 AM by Freestyle MD

    Can't get embedded font to work on Button

    stratosnatcher Level 1
      I'm trying to use an embedded font in order to fade Panels as well as the text in the Panels. I have the following code to set up the embedding (using Edwardian Script so I can be sure the font worked):

      <mx:Style>
      @font-face {
      src:url("C:/WINDOWS/Fonts/ITCEDSCR.TTF");
      fontFamily:myScript;
      }
      .scriptStyle {
      fontFamily:myScript;
      }
      </mx:Style>

      This works fine when I apply this style to Labels using the styleName property, but when using it on a Button, I get a really fuzzy/ugly text, as though the font didn't work and some bad default were used, that didn't scale to the small size very well.

      I've also tried directly setting fontFamily directly on the Button control, rather than using the intermediary style (scriptStyle).

      Is there some restriction about using embedded fonts on Buttons?
        • 1. Re: Can't get embedded font to work on Button
          Freestyle MD
          Hi,

          I was just looking for answers to my own question when I noticed this, which was giving me a problem earlier this week. I found that the default text for a button is 'bold' so if you haven't specified a bold embedded font, then it won't look good. I just got around it by specifying a 'normal' fontweight for my buttons.
          I would imagine that, after all this time, you've probably found the answer, but thought it might help anyone else who is a couple of weeks behind me on the learning curve ...