A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Embed fonts issue in dyanamic textfield

  1. #1
    Junior Member
    Join Date
    Oct 2010
    Posts
    13

    Embed fonts issue in dyanamic textfield

    Hi All,

    I have an issue about the italics when embedding the fonts in dynamic text field. I am using CS4 and as3.

    Here is my code:

    var fontArial:Arial = new Arial();
    var format:TextFormat = new TextFormat();

    format.align=TextFormatAlign.LEFT;
    format.font=fontArial.fontName;
    format.italic=true;

    var tf:TextField = new TextField();
    tf.autoSize=TextFieldAutoSize.LEFT;
    tf.defaultTextFormat = format;
    tf.embedFonts = true;
    tf.selectable = false;
    tf.htmlText="<p><i>This is italic text</i>. This is normal text</p>";
    //tf.setTextFormat(format)// I have tried setTextFormat too. But its not working either.
    addChild(tf);

    Its not working. The output is a plain text.

    Please someone help me if its a known issue.

    Thanks in advance

    Regards,
    Srinu

  2. #2
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    Make sure the italic character are also embedded in your font symbol.

  3. #3
    Junior Member
    Join Date
    Oct 2010
    Posts
    13
    Thanks for your quick reply, But under "Font symbol Properties" we only have the option to embed one font at a time. either "Regular" or "Italic".

    If there is any other way to embed all of them together please let me know.

    Thanks so much,
    Srinu

  4. #4
    Junior Member
    Join Date
    Oct 2010
    Posts
    13
    Thnks so much for you quick reply, I tried in another way. I have created a dynamic textfield on somewhere around the stage then I have embedded all the fonts in it. surprise!! now the italic and bold is working absolutely fine in run-time dynamic text fields too. I don't know how it is worked. May be all those italic and bold fonts are embedded automatically into the swf when we embed them in dynamic textfield which is on stage and same are applying to run-time dynamic text fields. Thanks to this forum and big thanks for your reply too..

    -Srinivas reddy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center