3 Replies Latest reply on Jul 4, 2006 6:10 AM by ufitzi

    Embed fonts dynamically

    Tolk Level 1
      How can i embed fonts for dynamically created textFields?
        • 1. Re: Embed fonts dynamically
          LB Back
          yourField.embedFonts = true;
          • 2. Re: Embed fonts dynamically
            Tolk Level 1
            a few questions:

            Will that embed all characters? If i just wanted to embed a certain group of characters how could i do that.

            If i have a large number of textFields all with the same font and size and i want to embed them all will using the method you described make my file size go through the roof?
            • 3. Re: Embed fonts dynamically
              ufitzi Level 1
              You could also create a new library Font object.
              In the options drop down in the library panle, choose New FOnt.
              Define your font, name it, set the linkage properties to "Export For ActionScript," and then you can apply it to your Text Fields using styles
              _global.styles.TextField.setStyle("fontFamily", "LIBRARY_IDENTIFIER_STRING");
              _global.styles.TextField.setStyle("embedFonts", true);

              Otherwise, you could create a MovieClip that contains a TextField, embed the neccessary characters, then create the MCs dynamically. That might be quicker if you haven't worked w/ styles before.