Dec10

Recently i was working on one of Adobe AIR project, in that i wanted to embed one font file in the CSS and apply that styles to the component. But flex was throwing the error as

1. "exception during transcoding: Unexpected exception encountered while reading font file '/I:/DEV/Fx_Workspace/FontIssue/src/PraxisEFLight.ttf'

2. unable to build font 'PraxisLight'

3. Unable to transcode PraxisEFLight.ttf.

I did not understand, what could be the issue with this font.  Then i spent 20 mins of time to find out the solution. In one of the forum, found solution to resolve this issue. Today am going to explain in detail to resolve this issue.

Step 1: Created new "Flex Project" named as "Font Issue"

Step 2: In this project, trying to embed "PraxisEFLight.ttf" font file in css. It shows below error

Step 3: To resolve this issue, Right click on the project and choose "Properties"

Step 4: From the Popup, select "Flex Compiler" and enter "-managers flash.fonts.AFEFontManager" in the Compiler arguments. Click apply and OK and build the project.

Step 5: After build is successful, the "Problems View" doesnot have any error. So it has been resolved the font issue. Go ahead and apply the styles to the component.

Let me know if you have any other approach to resolve this issue.

6 Responses to “Unable To Transcode Font File”

  1. Jack Salillas Says:

    Hello,
    I followed your advise but wasn't successful.. I am really frustrated now… my SDK currently is version 3, I noticed you have higher SDK. Do I need to upgrade my SDK to 3.5 or higher for this solution to work?…. please help me…. thank you very much!!!!

  2. Megharaj SH Says:

    Hi Jack,

    Try with SDK 3.5, you can download from following link http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK. Then configure the SDK in Flex Builder and compile. I hope it should work, if not then send me the font file will check from my end.

  3. Jack Salillas Says:

    Hey man!
    I appreciate your time answering my question and the link you've provided. However, unfortunately, I still wasn't able to embed the font. I've already downloaded SDK 3.5 from the link you've provided…. Here's what my code looks like:
     
    @font-face
    {
        src: URL("Fonts/HelveticaNeueLTStd-Roman.otf");
        font-family: "Helvetica";
    }

    @font-face
    {
        src: URL("Fonts/HelveticaNeueLTStd-Bd.otf");
        font-family: "HelveticaBold"
    }

     
    The Helvetica (roman) is OK, but the HelveticaBold isn't…. please help me…. still receiving the same error notice… This is really frustrating as time is really running out… huhuhuhuhuh….
     
    Thanks for your help, sir!….

  4. Megharaj SH Says:

    Hi Jack,

    I have downloaded the two files, which you are trying to embed. I am able to solve the issue. I have created two flex projects for web and desktop. Attached the source code, so check and let me know if you have any issues.

    1. Download Adobe Flex source code (Web Application)

    2. Download Adobe AIR source code(Desktop application)

    3. Download Adobe Flex Source Code(Available in ZIP file)

    Note : I have developed using Flash Builder 4 IDE and SDK is 3.5.

    I hope it will solve your issue.

    Thanks & Regards,

    Meg

  5. Saurabh Says:

    Your post explains the fix but not the cause of this issue, would help if you can outline that as well.

  6. Megharaj SH Says:

    Probably issue is in Flex SDK.

Leave a Reply