A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: fonts not working any more (flex)

  1. #1
    Member
    Join Date
    Jun 2011
    Posts
    85

    Unhappy fonts not working any more (flex)

    Hi,

    my fonts got screwed up when moving my flash-project to flex. They don't show up any more (strange thing is I don't get any error messages).

    Please - can somone help me out with this problem? Thank you.

    Code:
    [Embed(source="../../../../../assets/fonts/Orbitron/TTF/orbitron-medium.ttf", fontFamily="Orbitron", fontWeight="medium", mimeType='application/x-font', embedAsCFF='false')]
    public static const OrbitronMedium:Class;
    
    private var font:String;
    font = new Library.OrbitronMedium();
    
    private var statsTxtFormat:TextFormat;
    statsTxtFormat = new TextFormat();
    statsTxtFormat.font = font;
    statsTxtFormat.bold = false;
    statsTxtFormat.size = 14;
    statsTxtFormat.color = 0xfdfea1;
    statsTxtFormat.align = TextFormatAlign.RIGHT;
    statsTxtFormat.kerning = true;
    statsTxtFormat.letterSpacing = 1;

  2. #2
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    Try setting embedFonts to true.
    statsTxtFormat.embedFonts = true;

    I'm thinking they were never working correctly and you were merely seeing the side effect of having the fonts in question already loaded on the computer you are testing on.

  3. #3
    Member
    Join Date
    Jun 2011
    Posts
    85
    Thanks. I will give this a try.

  4. #4
    Member
    Join Date
    Jun 2011
    Posts
    85

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