I’m running Windows 7 and this OS has a little program called Private Character Editor (Start > Run > C:\WINDOWS\system32\eudcedit.exe) where you can select an available unicode slot and create any character using the editor’s bitmap field. I created a little happy face in slot E000.
I created a font in the library that I called ‘helv’ and selected “All” under “Character ranges” in the font’s Font Embedding properties dialog.
Then I execute this class, where first I have commented out all of the formatting:
package {
import flash.display.Sprite;
import flash.text.*;
public class UnicodeTest extends Sprite {
private var tf:TextField;
//private var tff:TextFormat;
//private var helv:Helv;
public function UnicodeTest():void {
//helv = new Helv();
//tff = new TextFormat();
//tff.font = helv.fontName;
//tff.size = 20;
//tff.color = 0x990000;
tf = new TextField();
//tf.defaultTextFormat = tff;
//tf.embedFonts = true;
tf.autoSize = TextFieldAutoSize.LEFT;
tf.text = "\ue000 OK";
addChild(tf);
}
}
}
This way, the little happy face appears in the unformatted text, as expected.
BUT… when I uncomment the TextFormat stuff and apply it, the happy face disappears.
What am I doing wrong? I suspect that maybe I need to add something about the unicode character in the Font Embedding dialog’s “Also include these characters” section but I don’t know what I’m doing there.