Skip navigation
Currently Being Moderated

Fonts Embed issue

Aug 1, 2012 10:48 PM

while iam embedding in air application through flash IDE. iam not able to see the text from where i get numarical numbers. can some one help me regarding this.


  Mystring : <font face="arial" size="20"><b> this is audioTranscript M01L01T01ST01P07P  </b></font>


View string: this is audioTranscript Sl

  • Currently Being Moderated
    Aug 2, 2012 4:34 AM   in reply to kiranemc2

    What process are you following to embed the font?

    Mark as:
  • Currently Being Moderated
    Aug 3, 2012 12:29 AM   in reply to kiranemc2

    When your textfield is on stage you can embed the font easily, select the textfield and go to that property and click the embed option there you can see select the character select numerals option then it will display correctly.(This embed option you can get only in cs5,cs5.5 and cs6 not in cs4)

    Mark as:
  • Currently Being Moderated
    Aug 3, 2012 7:54 AM   in reply to kiranemc2

    You should not need to use registerFont, at least I've not needed it. In order to use an embedded font, you should only need to make a Font object out of it, then use that in a TextFormat. Here's what I do:


    import flash.text.Font;

    import flash.utils.getDefinitionByName;



    var fontClass:Class = getDefinitionByName("libraryFontLinkageName") as Class;

    var theFont:Font = new fontClass() as Font;


    var texFormat:TextFormat = new TextFormat();

    textFormat.font = theFont.fontName;


    myField.defaultTextFormat = textFormat;

    Mark as:
  • Currently Being Moderated
    Aug 3, 2012 9:04 AM   in reply to kiranemc2

    kiranemc2 wrote:


    Mystring : <font face="arial" size="20"><b> this is audioTranscript M01L01T01ST01P07P  </b></font>


    You're bolding the font. This can often trigger havoc. You need to embed a font in regular, bold and italic (3 separate fonts and linkages) if you want to do things like that.


    I suggest you set your linkage names to something other than a built-in font name. Arial is on every machine in existence. Setting embedFonts=true isn't enough to be clear to the machine which font to use. Use names that do not exist as system fonts like:







    Then instead of using a <b> bold tag, do this:

    <font face="ArialBold" size="20">this is audioTranscript M01L01T01ST01P07P</font>

    Mark as:
  • Currently Being Moderated
    Aug 15, 2012 9:53 AM   in reply to kiranemc2

    A font is embedded as a Class so it should always start with an uppercase letter. That aside, are you using any fonts other than Arial? If not you really don't need to be going through all of this.


    I'd swoop back and ask yourself, do you really want to embed a font that every computer and device already has? Try removing the embedded Arial font and don't set embedFont=true. Still set the TextFields AntiAliasType.ADVANCED however. Then just use the proper font name and it should use your computer or devices font directly which is much higher performance, especially on mobile devices. You can also use your bold tag again as you were.


    <font face="Arial" size="20"><b>this is audioTranscript M01L01T01ST01P07P</b></font>


    A TextFormat object will accept the device fonts name as a string too of course:


    myTextField.defaultTextFormat = new TextFormat("Arial",20,0x0,true); // device font Arial, size 20, black, bolded

    Mark as:
  • Currently Being Moderated
    Aug 16, 2012 6:26 AM   in reply to kiranemc2

    Simply make the font face a variable so you can change it to a font that's supported by other languages. If you're doing online training where the user needs to load your app over the Internet then this is typically a good practice.


    I've had the unfortunate luck of having clients who both want a very specific non-standard font that needed Traditional and Simple Chinese. The font increased the initial download by 18MB. I'm not happy doing things like this, especially when the app is a promotional experience about a product. A user may sit through your download if it's an online e-learning course but not really for product advertising.


    Try device fonts you know to contain the glyphs in the style you choose for any particular language first. Arial actually contains them all but it doesn't look like a "good font" to other cultures. I ended up doing this more and more and I typically do it with 13-15 languages. Only Asian and Cyrillic fonts are the bane of my existence. Luckily good old Arial will handle almost all your Latin.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points