Reputation: 13561
So, in Flash Builder on Windows, my app and all embedded fonts compile just fine.
But when I try to build it on my production Linux server (via a Makefile on the command line using make
), compilation fails while transcoding the fonts:
/home/me/MyFlexProject/SomeModule/src/Fonts.as(29): Error: exception during
transcoding: Font for alias 'HelveticaRounded LT Std Blk' with plain weight
and style was not found at:
file:/home/me/MyFlexProject/SomeModule/src/assets/fonts/HelveticaRoundedLTStd-Black.otf
[Embed(source='/assets/fonts/HelveticaRoundedLTStd-Black.otf',
fontName='HelveticaRounded LT Std Blk',
mimeType='application/x-font',embedAsCFF='false')]
Things I have tried:
Using a different font manager, via "-managers=flash.fonts.AFEFontManage".
Using different fonts, but it either gives a slightly different version of the usual error, see:
Error: exception during transcoding: Font for alias 'xxx' with plain weight and style was not found at: file:...
Looking at the font using fontforge
, I think I've narrowed the problem down to the fact that apparently within the font file there are both "Windows" and "Mac" names defined. This seems like the possible culprit since on Windows the font compiles fine, but then on Linux it can no longer find a font with the same name. However, even when I switched to using the "Mac" name on Linux, I still get the same error about not being able to find a font with the requested name.
I want to find out what is going on that is preventing the transcoding from being able to happen.
Here is a link to the font in question: http://jetlib.com/HelveticaRoundedLTStd-Black.otf
For good measure, here is Fonts.as:
package ...
{
import flash.text.Font;
public class Fonts
{
[Embed(source='/assets/fonts/HelveticaRoundedLTStd-Black.otf',
fontNam e='HelveticaRounded LT Std Blk', fontWeight='normal',
mimeType='application/x-font',embedAsCFF='false')]
private static var _font1:Class;
/**
* register fonts with the font manager to be
* used in modules and sub applications
*/
public static function registerFonts():void
{
Font.registerFont(_font1);
}
}
}
Any help, thoughts, or insights would be GREATLY appreciated!
Output using fontWeight='bold':
/home/me/MyFlexProject/SomeModulesrc/Fonts.as(23): Error: exception during transcoding: Font for alias 'HelveticaRounded LT Std Blk' with bold weight was not found at: file:/home/me/MyFlexProject/SomeModulesrc/assets/fonts/HelveticaRoundedLTStd-Black.otf
[Embed(source='/assets/fonts/HelveticaRoundedLTStd-Black.otf',fontName='HelveticaRounded LT Std Blk',fontWeight='bold',mimeType='application/x-font',embedAsCFF='false')]
/home/me/MyFlexProject/SomeModulesrc/Fonts.as(23): col: 3: Error: unable to build font 'HelveticaRounded LT Std Blk'
[Embed(source='/assets/fonts/HelveticaRoundedLTStd-Black.otf',fontName='HelveticaRounded LT Std Blk',fontWeight='bold',mimeType='application/x-font',embedAsCFF='false')]
^
/home/me/MyFlexProject/SomeModulesrc/Fonts.as(23): col: 3: Error: Unable to transcode /assets/fonts/HelveticaRoundedLTStd-Black.otf.
Output with fontWeight='normal':
/home/me/MyFlexProject/SomeModulesrc/Fonts.as(23): Error: exception during transcoding: Font for alias 'HelveticaRounded LT Std Blk' with plain weight and style was not found at: file:/home/me/MyFlexProject/SomeModulesrc/assets/fonts/HelveticaRoundedLTStd-Black.otf
[Embed(source='/assets/fonts/HelveticaRoundedLTStd-Black.otf',fontName='HelveticaRounded LT Std Blk',fontWeight='normal',mimeType='application/x-font',embedAsCFF='false')]
/home/me/MyFlexProject/SomeModulesrc/Fonts.as(23): col: 3: Error: unable to build font 'HelveticaRounded LT Std Blk'
[Embed(source='/assets/fonts/HelveticaRoundedLTStd-Black.otf',fontName='HelveticaRounded LT Std Blk',fontWeight='normal',mimeType='application/x-font',embedAsCFF='false')]
^
/home/me/MyFlexProject/SomeModulesrc/Fonts.as(23): col: 3: Error: Unable to transcode /assets/fonts/HelveticaRoundedLTStd-Black.otf.
Upvotes: 2
Views: 2859
Reputation: 251
Be sure you are not overwriting the default flex config file. If you need some config property append them in Additionnal compiler arguments : -load-config+=configFile.xml rather than -load-config configFile.xml It solve our trouble
Upvotes: 0
Reputation: 744
I've had the same issue on RedHat release 5.5 . I moved to Ubuntu 11 and it compiled with no problems.
Upvotes: 0
Reputation: 415
I can only guess as I haven't yet tried to embed fonts on Linux. But from what I know, the behaviour of the font-manager is dependant on the OS as every Operating System has a different font API that is presented to the underlying Java framework of Flex. The fontWeight parameters can differ from platform to platform.
Have you tried "Black" as the value for fontWeight? If my guess is right, the font-manager could not ask the system for the weight of this font and tried to find the weight inside the otf. But the otf has "Black" defined as its weight. I hope this helps, kind regards...
Upvotes: 2
Reputation: 12656
Is it failing both with and without fontWeight='bold'
? Your two snippets variably include and omit that line. One of the two is correct.
Edit: apparently it fails in both cases. I've got nothin'.
Upvotes: 2