Error: exception during transcoding

ido.ran's Avatar

ido.ran

10 Aug, 2014 08:28 PM

I'm building Adobe AIR mobile application.
In that application I'm using embedded font as following:
[Embed(source="Rokkitt-Bold.otf", embedAsCFF="false", fontFamily="Rokkitt-Bold", unicodeRange = "U+0020-U+007e")]

I get this error while building the project:

Execution failed for task ':compileFlex'.
> java.lang.Exception: mxmlc execution failed: /Users/idoran/Documents/comp/dev/at/src/com/comp/at/atRoot.as(37): Error: exception during transcoding: 
  
        [Embed(source="Rokkitt-Bold.otf", embedAsCFF="false", fontFamily="Rokkitt-Bold", unicodeRange = "U+0020-U+007e")]
  
  /Users/idoran/Documents/comp/dev/at/src/com/comp/at/atRoot.as(37): col: 3: Error: unable to build font 'Rokkitt-Bold'
  
        [Embed(source="Rokkitt-Bold.otf", embedAsCFF="false", fontFamily="Rokkitt-Bold", unicodeRange = "U+0020-U+007e")]
    ^
  
  /Users/idoran/Documents/comp/dev/at/src/com/comp/at/atRoot.as(37): col: 3: Error: Unable to transcode Rokkitt-Bold.otf.

The font file is in src/com/comp/at directory. I've even try to add that directory to resourceDirs.

This is the build.gradle file I use:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath group: 'org.gradlefx', name: 'gradlefx', version: '0.8.3'
    }
}


apply plugin: 'gradlefx'


flexHome = "/Applications/Apache Flex/Flex4.12.1_AIR13.0" type = 'swf' frameworkLinkage = 'none'


mainClass = 'AdventureTown' srcDirs = ['src'] resourceDirs = ['src/com/comp/adventuretown'] playerVersion = '13'


additionalCompilerOptions = [ "-target-player=13.0", "-swf-version=24" ]


dependencies { merged fileTree(dir: 'CreateMode/CreateModePlayer/build', include: '*.swc') merged fileTree(dir: 'include/compportal_air/build', include: '*.swc') merged fileTree(dir: 'lib', include: '**/*.swc') merged fileTree(dir: 'lib', include: '**/*.ane')

test fileTree(dir: 'test/lib', include: '**/*.swc')

external files(flexHome + '/frameworks/libs/air/airglobal.swc')
merged files(
    flexHome + '/frameworks/libs/core.swc',
    flexHome + '/frameworks/libs/OSMF.swc',
    flexHome + '/frameworks/libs/textLayout.swc',
    flexHome + '/frameworks/libs/authoringsupport.swc',
    flexHome + '/frameworks/libs/air/servicemonitor.swc',
)



}
  1. Support Staff 1 Posted by Yennick Trevels on 11 Aug, 2014 10:36 AM

    Yennick Trevels's Avatar

    Not really sure whether either of these will work, but have a try:

    1. Specify the full path instead of a relative one (normally a relative one should work, but you never know):

      [Embed(source="/com/comp/at/Rokkitt-Bold.otf" ...

    2. Specify another font manager:

      additionalCompilerOptions = [ '-managers', 'flash.fonts.AFEFontManager' ]

  2. 2 Posted by ido.ran on 11 Aug, 2014 11:33 AM

    ido.ran's Avatar

    I've end up adding air-config.xml to the load-config switch.
    It works now.

    additionalCompilerOptions = [
    "-load-config=" + flexHome + "/frameworks/air-config.xml" ]

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

07 May, 2023 04:17 PM
28 Apr, 2023 11:22 PM
23 Apr, 2023 09:43 AM
03 Nov, 2022 01:22 AM
29 Jun, 2022 05:39 PM

 

04 Aug, 2021 12:50 PM
15 Apr, 2021 06:10 PM
15 Jan, 2021 06:56 PM
09 Mar, 2020 11:11 PM
09 Mar, 2020 11:09 PM
17 Apr, 2019 02:51 PM