Skip navigation
rhodesbe
Currently Being Moderated

Can you embed a font just using ActionScript in Flash CS4?

Nov 26, 2008 11:38 AM

I want to embed a font for use with the new text framework in Flash CS4 just using ActionScript. Can anyone provide an example?
 
Replies
  • Brian Thomas
    168 posts
    Nov 14, 2008
    Currently Being Moderated
    Nov 26, 2008 12:11 PM   in reply to rhodesbe
    Check out this post on our blog: Embedded Font Subsetting Using DefineFont4. I recommend this method of ActionScript font embedding for use in TLF.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 26, 2008 5:20 PM   in reply to rhodesbe
    Sounds like your project is somehow using an older Flex SDK compiler and not Flex Gumbo compiler. Are you sure you picked the Flex Gumbo sdk by choosing "Use a specific SDK" and pointing it to the Flex Gumbo SDK as indicated at this link?
    http://blog.flexexamples.com/2008/08/02/using-the-beta-gumbo-sdk-in-fl ex-builder-3/
     
    |
    Mark as:
  • Brian Thomas
    168 posts
    Nov 14, 2008
    Currently Being Moderated
    Dec 3, 2008 1:00 PM   in reply to rhodesbe
    Unfortunately I have not yet had the chance to attempt to use Flex Gumbo embedding in Flash CS4. I built the examples in Flex Builder 3. I have found some posts that might help you out; I realize they are for earlier versions of Flex, but I'm hoping that they will give you some ideas for getting Gumbo hooked up to Flash CS4.

    Using the Flex SDK with Flash CS4
    Using Flex Webservice component in Flash CS4

    Hopefully those are helpful. I'll post again if I can come up with some better info on using Gumbo in Flash CS4.
     
    |
    Mark as:
  • Brian Thomas
    168 posts
    Nov 14, 2008
    Currently Being Moderated
    Dec 4, 2008 9:52 AM   in reply to rhodesbe
    Yes, this is a sign of the wrong SDK being used. The 'cff' parameter is the key to specifying DefineFont4 and is only supported in Gumbo.
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 4, 2008 2:20 PM   in reply to rhodesbe
    rhodesbe,

    I tried a similar CFF embedding test in Flex Builder 3.0.2 with Flash Player 9.x and got the similar warning ("transcoding parameter 'cff' is not supported by 'flex2.compiler.media.FontTranscoder").

    I was actually playing around with this a week ago and hit this roadblock as well. I asked around on the Flash Authoring team and got this pointer:
    quote:

    The new embed functionality is in mxmlc.jar. You could try replacing the mxmlc.jar installed with Flash CS4 with a more recent version, but i’m not very optimistic that would work very well (definitely don’t delete the old copy). The dependencies between flash and mxmlc are many and complex, and they have likely been broken in new versions.


    I tried replacing my mxmlc.jar file in Flash CS4 with a recent nightly build of Flex Gumbo SDK and had less than stellar results:
    quote:

    "Error initializing Java Runtime Environment. You may need to reinstall Flash."


    The only other suggestion given to me was:
    quote:

    You could create a swc file using a new version of flexbuilder with the new embed stuff available in gumbo (defining ArialEmbeddedFont), and then put the swc in the library path for your FLA and access the ArialEmbeddedFont that way. I think that would work fine, since flexbuilder would handle the [Embed]. The only issue would be if the flash swc linker doesn’t handle definefont4 correctly, but i think we tested that.


    I haven't had a chance to experiment with that, but it should work. Let me know if you have any success.
    I don't know when I'll get time to test it out, but if I get something working I'll add it to actionscriptexamples.com and/or flexexamples.com.

    Regards,
    Peter
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 5, 2008 9:59 AM   in reply to rhodesbe
    I wouldn't go as far as to say "fault". DefineFont4 and CFF is all new/beta stuff being worked on in Gumbo and TLF. Flash CS4 was already finished before this stuff was finalized. I'll keep looking into this when I get a bit of time to see if I can get the FlexBuilder SWC approach working in the meantime though.

    Regards,
    Peter
     
    |
    Mark as:
  • Currently Being Moderated
    Jan 13, 2009 6:50 PM   in reply to rhodesbe
    Is there an update on this issue?
    Updating the library path to Gumbo is also not working for me.
    I need a way to embed fonts in the Flash IDE not using the Text Layout Framework.
    Thank you
     
    |
    Mark as:
  • Currently Being Moderated
    Jan 14, 2009 10:32 AM   in reply to rhodesbe
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 23, 2009 1:19 PM   in reply to rhodesbe

    I get the same error: transcoding parameter 'cff' is not supported by 'flex2.compiler.media.FontTranscoder'  in flex Gumbo, build 4.0.0.8031.

     

    Any idea why I can't embed a font in flex 4?

     
    |
    Mark as:
  • Brian Thomas
    168 posts
    Nov 14, 2008
    Currently Being Moderated
    Jun 23, 2009 6:51 PM   in reply to cdman522

    You shouldn't see this error if you are building with Gumbo. You should double check your SDK setup. Are you sure that you aren't overriding the SDK version in your project settings?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 23, 2009 10:39 PM   in reply to rhodesbe

    In build 7972, the 'cff' transcoding parameter was renamed to 'embedAsCFF'.

     

    Gordon Smith

    Adobe Flex SDK Team

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 24, 2009 7:56 AM   in reply to Brian Thomas

    If you are talking about right clicking the project and changing the compiler/sdk settings there then I've done that several times. Each time it says it's using sdk 4.0.0.8031, never changes. If there's something else you are refering to, then please be more specific.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 24, 2009 8:15 AM   in reply to GordonSmith

    Thanks Gordon, that seemed to fix my problem.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 4, 2010 2:28 AM   in reply to cdman522

    I don't understand how you fixed it.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 4, 2010 6:32 AM   in reply to vorpal

    Gordon said

     

    In build 7972, the 'cff' transcoding parameter was renamed to 'embedAsCFF'.

     

    Gordon Smith

    Adobe Flex SDK Team


    Which was what fixed my problem. I was using cff and needed to change it to embedAsCFF

     

    Hope that helps.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points