Home > ActionScript 3, flash, flex, general, tutorial > font embedding tip – “Error: Unable to transcode…”

font embedding tip – “Error: Unable to transcode…”

hi folks,
this week i had to externalize fonts in an AS3 project. so i looked into my delicious links and found two very good tutorials, one by Troy Gardner on the TroyWorks blog and another one by Deden Ramadhan on the ini na!! blog.
in the first moment everything worked fine and i had no problems embedding the fonts, loading them and finally using them at runtime. i like how it works!
some days later i had to embed cyrillic, chinese and japanese characters from an ArialUnicodeMS.ttf font. then i always got the error message: “Error: Unable to transcode ArialUnicodeMS.ttf.”, at compile time. the first idea was that there’s something wrong with the ArialUnicodeMS.ttf file, because it works fine with other font files. so i tried another ArialUnicodeMS.ttf file from a colleague, but the result was the same error message. using google wasn’t that much successful, but i got a hint from a colleague that
flex includes several font managers to handle embedded fonts, exactly three. here you can find some informations about the three managers in the livedocs.

so the solution for my problem was to use the flash.fonts.AFEFontManager and everything works fine. to change the font manager you can simply use the compiler argument:

-managers flash.fonts.AFEFontManager

for your mxmlc compiler.

  • Digg
  • del.icio.us
  • Blogosphere News
  • Facebook
  • LinkedIn
  • MySpace
  • Netvibes
  • Twitter
  1. March 24th, 2009 at 15:10 | #1

    very good to know. thanks a lot fabi ;)

    cheers.rob

  2. June 25th, 2009 at 03:06 | #2

    By the way, I ran into the issue of Flex failing to transcode ArialUnicodeMS myself a few months back. For what it’s worth I believe it’s due to the sheer size of the font. That puppy has so many characters I think Flex is timing out on the operation. We ripped it apart in a font editor and cut out the Korean faces (it was for a Japanese/Chinese app) and Flex took it fine.

  3. sunnie
    December 16th, 2009 at 20:38 | #3

    hi there, i googled ‘transcoding problems flash catalyst’ and your site came up. Im not sure if your ttf file issue was similar to a message that came up when I tried running my project, as it came up with this:

    Flash Catalyst cannot run this project because of an error in the code. To find the error, switch to the Code workspace and look in the Problems panel.

    I checked the code workspace and it says:
    exception during transcoding: Failed to grab pixels for image…

    I tried re-saving the files but no luck! do you have any ideas?!! cheers

  4. Trostik
    February 3rd, 2010 at 08:38 | #4

    Thanks m8 !!! That was helpful.

  1. No trackbacks yet.