A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Embedding fonts doesn't work on non-coded textFields

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

    Embedding fonts doesn't work on non-coded textFields

    I've got a couple of TextField initialized in code (as3). They use my embedded font (aharoni), and that just works.
    But the fonts that i've written directly into the movieclips in flash cs3, just don't work.

    When i play the swf on another computer that doesn't have aharoni, the coded TextFields are aharoni, but the textFields in the movieclips that i've written directly are Times new Roman, because that computer doesn't have Aharoni.
    I've set the text font to my embedded font.

    What am I doing wrong?
    I program in AS3 only.

  2. #2
    Senior Member Steven FN's Avatar
    Join Date
    Mar 2010
    Location
    CA, USA
    Posts
    276
    What do you mean by "written directly"? I'm guessing you added them manually and not through code.

    I would think that the problem is that you need to either set the TextField as Dynamic Text and then embed the Characters there OR You have your anti-alias set to Device Font, which will use a substitute font if not found.

  3. #3
    AskMeFlash
    Join Date
    Mar 2010
    Location
    United Kingdom
    Posts
    2
    Check more on embedding fonts here: http://askmeflash.com/qdetail/566/em...-fonts-in-flex

  4. #4
    Senior Member
    Join Date
    Jul 2008
    Posts
    418
    Quote Originally Posted by Steven FN View Post
    What do you mean by "written directly"? I'm guessing you added them manually and not through code.

    I would think that the problem is that you need to either set the TextField as Dynamic Text and then embed the Characters there OR You have your anti-alias set to Device Font, which will use a substitute font if not found.
    Sorry for my late response, I didn't have access to my computer for a while.

    I did not set my anti alias to device font so thats not the problem.
    I have set the textfield to a dynamic text, and that does embed it, so that works, but the side effect s that you can now select it with your mouse.

    Is this always the case with dynamic texts, or can that be changed?
    if not, are there other ways to embed them, because that would give me the dilemma of not controlling the font and the text being selectable.

    Thank you.
    I program in AS3 only.

  5. #5
    Senior Member Steven FN's Avatar
    Join Date
    Mar 2010
    Location
    CA, USA
    Posts
    276
    Yes, you can disable the Selectability by clicking on the Selectable option in the Properites panel. It should look like an "A" icon. There is a way in script as well.

  6. #6
    Senior Member
    Join Date
    Jul 2008
    Posts
    418
    Quote Originally Posted by Steven FN View Post
    Yes, you can disable the Selectability by clicking on the Selectable option in the Properites panel. It should look like an "A" icon. There is a way in script as well.
    Thanks alot, it works perfectly now!
    I program in AS3 only.

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