A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: embedFonts=true fails

  1. #1
    Junior Member scudsucker's Avatar
    Join Date
    Feb 2003
    Location
    Cape Town, RSA
    Posts
    1,509

    embedFonts=true fails

    Hi everyone: using MX2004, and looping through an array to create mutliple dynamic textfields, my font refuses to embed.

    How to I ensure that a font is embedded? Linkage? or what? I've already tried to embed the font through creating a textfield in frame 1 with "embed" is true, and in the library by importing the font and adding Linkage properties ( export for actionscript, frame 1), but its still not working.
    code:

    // mv is a reference to a newly created moviClip
    mv.createTextField("txt", mv.getNextHighestDepth(), 0, 0, 100, 22);
    mv.txt.html = true;
    mv.txt.htmlText = a[cols];
    //
    var txtFmt = new TextFormat();
    txtFmt.embedFonts = true;
    txtFmt.font = "ProFontWindows";
    txtFmt.size = 15;
    //
    mv.txt.autoSize = true;
    mv.txt.setTextFormat(txtFmt);

    Last edited by scudsucker; 02-10-2005 at 06:56 AM.
    Hariyemadzisawira nhaka yedu! Down the SCUD and win!
    I'm too lazy to read Private Messages.

  2. #2
    Junior Member scudsucker's Avatar
    Join Date
    Feb 2003
    Location
    Cape Town, RSA
    Posts
    1,509
    Dont worry- I've done a work-around: creating a movieclip with a textfield in it on the stage, manually selecting "embed font" then instead of creating new movieclips I attach the one I have created.

    Would still be interested as to why embedFonts=true faisl even when the font appears in every way to be embedded via linkage AND by having a textfield with "embed fonts" enabled...
    Hariyemadzisawira nhaka yedu! Down the SCUD and win!
    I'm too lazy to read Private Messages.

  3. #3
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    It's TextField.embedFonts , and not TextFormat.embedFonts...

    You don't set the embedding in the text format, but on the textfield itself.

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