English 中文(简体)
AS3: 阿拉伯文床位
原标题:AS3: Arabic Embed Fonts

I am using as3 and trying to use embed fonts with Arabic text but it doesn t work So is there a way that I can access from .tff file the shape of the character or make it works using embed fonts

As using system fonts works but at same time its bad as on some machines it is reverted so I want to use embed font

Hope anyone can help

最佳回答

I found code by some one to change the input arabic text to the correct shape based on the position in text and I modified it to work perfectly with my code :)

http://www.akhalifa.com/testing/ArabicAS3File/ArabicStringUtils.as” rel=“nofollow noreferer” http://www.akhalifa.com/testing/ArabicAS3File/ArabicStringUtils.

and here an example on how to use it: http://www.akhalifa.com/testing/ArabicAS3File/Main.as

问题回答

You can use any arabic/persian input language like Maryam4 then write your sentence in this program after that copy it and paste in your code also as @Goran Mottram said embed your font (for this situation if you use Maryam you must select F_fonts) but noticed that in your code if you paste your arabic language it shows you wired character like ÂMoø , but dont worry if you publish you see a correct arabic word with rtl support

如果您的系统安装了字体,确保把字体输入你的图书馆,并贴上“行动之快”的盒子,并给它一个适当的名称,即My ArabicFont,然后用以下代码将其带至文字现场:

// create the font
var myFont:Font = new MyArabicFont();

// assign to textformat
var myTextFormat:TextFormat = new TextFormat();
myTextFormat.font = myFont.fontName;

// assign to textfield          
var myTextField:TextField = new TextField();
myTextField.defaultTextFormat = myTextFormat;
myTextField.embedFonts = true;
myTextField.text = "Hello, world";
this.addChild(myTextField);




相关问题
Which non-bold UTF-8 iPhone SDK font can I use here?

Problem: I create a UILabel with this font: label.font = [UIFont systemFontOfSize:15.0f]; Now this system font is bold, but I want to display pretty small text, and the text may also contain very ...

Limiting file upload type

Simple question. Is there a way to only allow txt files upon uploading? I ve looked around and all I find is text/php, which allows PHP. $uploaded_type=="text/php

Extract everything from PDF [closed]

Looking for solution to extract content from a PDF file (using console tool or a library). It will be used on server to produce on-line e-books from uploaded PDF files. Need to extract following ...

Flash & external form fields

Does anybody know if this is possible? I am trying to create a flash movie that will show / preview what I am typing into a field in a normal HTML form. The call to update the flash movie would most ...

Avoiding escape sequence processing in ActionScript?

I need to mimic C# functionality of the @ symbol when it precedes a string. @"C:AFilePath" for example What is the best way to do this? Also there are some sites that will escape larger ...

iPhone: Draw rotated text?

I want to draw some text in a view, rotated 90°. I m pretty new to iPhone development, and poking around the web reveals a number of different solutions. I ve tried a few and usually end up with my ...

Numbering in jQuery

How could I change the text below so that the text within it has a number appended to it. <div class="right">This is some text</div> <div class="right">This is some text</div>...

热门标签