Font Rendering Errors in Flash CS5?
i'm suddenly experiencing errors in font rendering in my project.
the following image is a square sprite with a开发者_JAVA百科 texture and 2 dynamic text fields as children.
the text itself is correct. the bottom field is a 32-bit hexadecimal color ("H: 0xFFFFF4A1"), but as you can see some of the characters are stretched ("x", "4" and "1"). it's the same in the first text field which lists each color in ARGB format.
the font being used is Myriad Pro Condensed. i was originally using Myriad Pro Bold Condensed, which i was using for months, but suddenly yesterday the font became even crazier than what's visible here so i switched. now this font is being rendered incorrectly also.
i've validated the fonts.
i've deleted my ASO files.
i'm using cacheAsBitmapMatrix on the parent sprite object, but cacheAsBitmapMatrix is suppose to only affect mobile devices so i'm not sure why it would be rendering the font like this (if it's the problem) while running under ADL on my desktop.
newSwatch.cacheAsBitmapMatrix = new Matrix();
newSwatch.cacheAsBitmap = true;
this is how i'm calling the font, which is embedded in my library.
//Create Text Field
private function swatchTextField():TextField
{
var myFont:Font = new MyFont();
var textFormat:TextFormat = new TextFormat();
textFormat.bold = true;
textFormat.color = 0xFFFFFF;
textFormat.font = myFont.fontName;
textFormat.size = swatchSize / 10;
var result:TextField = new TextField();
result.antiAliasType = AntiAliasType.ADVANCED;
result.blendMode = BlendMode.ERASE;
result.autoSize = TextFieldAutoSize.LEFT;
result.defaultTextFormat = textFormat;
result.embedFonts = true;
result.multiline = true;
result.selectable = false;
result.type = TextFieldType.DYNAMIC;
return result;
}
i don't know what else to do. if i switch to another font it will probably just mess up again. when i click on the object it zoomed in. while zooming in it also rotates a bit. while doing so i can see the font errors are slightly changing. i'm almost convinced it's a problem with cacheAsBitmapMatrix, but the error still persistas even removing that from the code.
here's the same object with a different rotation:
any clues at all would be greatly appreciated!
UPDATE:
this error was indeed not a problem with Flash but a bug Apple introduced in Mac OS X 10.6.7 that affected the display and printing of some open-type fonts. the bug has since been addressed and a fix is now available for download: http://support.apple.com/kb/HT4605
Are you using a mac? This might help you:
Adobe bug about the issue
After upgrading to Mac OSX 10.6.7, some users are encountering font rendering issues with many different OpenType fonts. This issue occurs in Flash CS5 and earlier.
It's a Mac/Flash CS5 bug.
To resolve it, you need to close Flash and re-open it. The bug may disappear. If not, after few try, you need to downgrade to OSX 10.6.6.
See the link below (of @redHouse71)
This has happened to me but I found a simple restart of my mac solves it. I am porting one of my air apps to an android tablet and it actually does the same thing when the mac is playing up.
Just thought I would add this in.
精彩评论