UPDATE: I've completely changed the question because in reality, I'm having a really hard time properly using device-fonts for multiple languages displayed in the same app (at the same time).
I must use device-fonts (cannot use the .embedFonts = true
property) and I won't be masking, scaling or rotating or animating the text anyways. I'm not worried about the disappearing issues side-effects. I'm noticing that English characters are showing up correctly, BUT other characters aren't...
Like the following encoded characters for example:
सकत
Instead, the above characters show up as hollow squares.
Is there something I need to use / be aware of? I've looked into these:
What I'm trying to do is display single words (or short sentences) from various sources and various languages. In other words.... many TextFields will be scattered near eachother, but each TextField will use one language independant from the other Textfields. One may be in Mandarin, another in Spanish, another in French, in English... etc.
What do I need to do to get the Font "_sans" (or any supported device fonts) to show up correctly in various languages?
I think I may have finally resolved my device-font issue.
In Flex, it looks like modifying the style letter-spacing other than zero (0) will break the font-support for Asian characters. Perhaps only the Latin characters are meant to be customized with those extra styles.
But anyhow, for those of you who encounter hollow squares instead of the actual asian character, verify that you are not using style-properties that may be unsupported by the character set.
My approach to setting the label with the correct style was to override the label setter accessor:
override public function set label(value:String):void {
super.label = value;
//If English characters / numerals (space letters by 1-pixel):
if(/[a-z0-9]/i.test(value)) {
this.setStyle("letterSpacing", 1);
} else {
this.setStyle("letterSpacing", 0);
}
}