A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [RESOLVED] Text from Text tool looks "richer" than text from code

  1. #1
    Senior Member
    Join Date
    Jul 2008
    Posts
    391

    resolved [RESOLVED] Text from Text tool looks "richer" than text from code


    The textfield on top is made from code, left is without bold and right is with bold
    PHP Code:
    var tform:TextFormat = new TextFormat ("Comic Sans MS"120xFFCC00);
    var 
    tf:TextField = new TextField ();
    tf.defaultTextFormat tform;
    tf.selectable false;
    tf.width 100;
    tf.height 20.7;
    tf.text text
    The textfield on the bottom is made from the text tool in the IDE, left is regular and right is bold.

    This is all the properties of that textfield.

    How do I make the top text look like the bottom text? I think the bottom one looks nicer than the top.

  2. #2
    Lunatic
    Join Date
    Nov 2002
    Location
    AS3 Forum
    Posts
    342
    tf.antiAliasType = AntiAliasType.ADVANCED;
    tf.thickness = 200;

    Try that see if it works for you.

  3. #3
    Senior Member
    Join Date
    Jan 2009
    Posts
    208
    How about embedding the font with code?

  4. #4
    Senior Member
    Join Date
    Jul 2008
    Posts
    391
    Hurray both your ideas worked! But is there a way to create a font to embed with purely code? Cause I had to create a font in the library and export it, I'm trying to make my programs pure code.

  5. #5
    Senior Member
    Join Date
    Jan 2009
    Posts
    208
    You can with at least Flash CS4:

    http://www.gotoandlearn.com/index.php?currentpage=3

    Runtime Font Loading

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