How can I embed arabic Font in Flash?
I want to use various Arabic Fonts in Flash. I using AS3 and the textLayout.swc with the FDT in Eclipse. And compiling with the Flex SDK 4.0.0. The Compiler-Arguments are
-default-size 780 260 -default-frame-rate 31 -static-link-runtime-shared-libraries=true -managers=flash.fonts.AFEFontManager -default-background-color 0xFFFFFF -library-path {flexSDK}/frameworks/locale/en_US --target-player=10.0.32
I try this:
Embed the Arabic Font in a Font-Class
[Embed(source='../../../../assets/fonts/AXTGIB__.TTF', fontName='AXtGIhaneBold', mimeType="application/x-font", embedAsCFF="true")]
public var AXtGIhaneBold : Class;
public function Fonts() {
Font.registerFont(AXtGIhaneBold);
}
Create a TextFlowElement and do this:
textFlow = new TextFlow();
layoutFmt = new TextLayoutFormat();
layoutFmt.direction = Direction.RTL;
layoutFmt.fontFamily = "AXtGIhaneBold";
layoutFmt.renderingMode = RenderingMode.CFF;
layoutFmt.fontLookup = FontLookup.EMBEDDED_CFF;
textFlow.format = layoutFmt;
But it doesn't work. The Font in Flash don't change to AXtGIhaneBold.
Can anyone tell me what's wrong?
