• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

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

New Here ,
Nov 26, 2008 Nov 26, 2008

Copy link to clipboard

Copied

I want to embed a font for use with the new text framework in Flash CS4 just using ActionScript. Can anyone provide an example?
TOPICS
Text layout framework

Views

16.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Dec 04, 2008 Dec 04, 2008
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 versi
...

Votes

Translate

Translate
Adobe Employee ,
Nov 26, 2008 Nov 26, 2008

Copy link to clipboard

Copied

Check out this post on our blog: Embedded Font Subsetting Using DefineFont4. I recommend this method of ActionScript font embedding for use in TLF.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 26, 2008 Nov 26, 2008

Copy link to clipboard

Copied

I've read that article. I'm using this meta tag in my class:
[Embed(source="MinionPro-Regular.otf", fontFamily="MinionPro", cff="true")]
private var MinionFont:Class;

But when I compile I get this error.
"transcoding parameter 'cff' is not supported by 'flex2.compiler.media.FontTranscoder'"

I've downloaded the Gumbo SDK and tried adding to my library path, but I still get the same error. Any advise?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 26, 2008 Nov 26, 2008

Copy link to clipboard

Copied

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-flex-builder-3/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 01, 2008 Dec 01, 2008

Copy link to clipboard

Copied

quote:

Originally posted by: joe.shankar
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-flex-builder-3/


I figured that was the problem, however I can't figure out what I'm doing wrong. I've downloaded the gumbo sdk and I've assigned it in Flash CS4.

Here is a screen shot of my configuration setup.
http://www.nocircleno.com/ben/flash_as3_settings_screen.gif

Do you have any idea of what I'm doing wrong?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 03, 2008 Dec 03, 2008

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 04, 2008 Dec 04, 2008

Copy link to clipboard

Copied

Thanks for the links Brian, but I'm still not having any luck. I was doing just as the article specified and I'm still getting the same error:

"transcoding parameter 'cff' is not supported by 'flex2.compiler.media.FontTranscoder"

Does the Gumbo Flex compiler still use 'flex2' in the package name or is this a sign that the wrong SDK is still being used?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 04, 2008 Dec 04, 2008

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Dec 04, 2008 Dec 04, 2008

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 05, 2008 Dec 05, 2008

Copy link to clipboard

Copied

Thanks for looking into this Peter. This was driving me crazy and I'm glad it turns out to be Flash CS4's fault. Hopefully this will be fixed in the future. I'll give the SWC approach a try.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Dec 05, 2008 Dec 05, 2008

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 05, 2008 Dec 05, 2008

Copy link to clipboard

Copied

quote:

Originally posted by: peterd_mm
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.


I figured Flash CS4 would be updated for the final release. I did get the SWC method to work.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 13, 2009 Jan 13, 2009

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 14, 2009 Jan 14, 2009

Copy link to clipboard

Copied

Not yet, there will have to be a patch for Flash CS4.
If you really want this to work now, then you'll have to:
1) Create a Flex Component project with Flex Builder
2) Make sure you have the Gumbo SDK and it has been configured for this component project.
3) Embed the font within that project. Your project doesn't need to do anything else.
4) Create a SWC file.
5) Add the SWC to your Flash CS4 project and you can use these fonts within Flash CS4

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Jan 14, 2009 Jan 14, 2009

Copy link to clipboard

Copied

I have a poorly written tutorial on ActionScriptExamples.com at http://actionscriptexamples.com/2008/12/20/embedding-fonts-from-a-flex-application-into-a-flash-swf-...

Peter

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 23, 2009 Jun 23, 2009

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 23, 2009 Jun 23, 2009

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 24, 2009 Jun 24, 2009

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Jun 23, 2009 Jun 23, 2009

Copy link to clipboard

Copied

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

Gordon Smith

Adobe Flex SDK Team

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 24, 2009 Jun 24, 2009

Copy link to clipboard

Copied

Thanks Gordon, that seemed to fix my problem.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 04, 2010 Sep 04, 2010

Copy link to clipboard

Copied

I don't understand how you fixed it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 04, 2010 Sep 04, 2010

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines