FTETextField Anti-aliasing broken?
Cross Posted at: http://forums.adobe.com/message/3595873#3595873
Robin I am using FTETextField, using rotation, and using cff embeded fonts which is verified by FlexGlobals.topLevelApplication.SystemManager.IsFontEmbeded(objFontFo rmat) - which returns true...
However, the text looks like crap when rotated. We were able to solve this in our previous iterations via sharpness and thinkness on advanced Anti-Alias settings ( see:http://blog.flexexamples.com/2007/10/24/setting-a-fonts-anti-alias-typ e-sharpness-thickness-and-grid-fit-type-in-flex/), but now we are trying to make all our charting components multi-lingual (http://www.Dedoose.com) and thus using FTE.
These options were on UITextFormat, but are no longer available in the FTE components as far as all the sleuthing I've done.
I have a simple demo app with a mx label, spark label, and FTETextField. T
he mx label using a nonCFF embeded font, the spark and FTE using the same cff embeded font.
The mx I can control the sharpness and thickness and looks great!
The spark label looks okay, it's at least anti-aliasing properly though I would like to control the font thickness a little better.
The FTEText field is a disaster: It is supposedly using the exact same FTE engine and font as the spark label but looks like crap when rotated. If you decrease the font size it gets far worse.
Please please help, the spark label is not an option as this is for a sprite based charting engine per raw performance is mission critical.
Here is the code and an screenshot:

Code:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" initialize="OnInit(event)">
<fx:Style>
@11909012 s "library://ns.adobe.com/flex/spark";
@11909012 mx "library://ns.adobe.com/flex/mx";
@11220649-face
{
src: url("HELVETICA.TTF");
fontFamily: fntEmbededHelveticaCFF;
embedAsCFF: true;
}
@11220649-face
{
src: url("HELVETICA.TTF");
fontFamily: fntEmbededHelveticaNotCFF;
embedAsCFF: false;
}
</fx:Style>
<fx:Script>
<![CDATA[
import mx.core.FTETextField;
import mx.core.FlexGlobals;
protected var _txtFTE:FTETextField;
protected var _objRotTimer:Timer;
protected function OnInit(objEvent:Event):void
{
var objFormat:TextFormat = new TextFormat("fntEmbededHelveticaCFF", 12);
_txtFTE = new FTETextField();
_txtFTE.embedFonts = true;
_txtFTE.text = "Testing FTE";
_txtFTE.setTextFormat(objFormat);
ucFTEHolder.addChild(_txtFTE);
lblEmbeded.text = "IsFontEmbeded: " + FlexGlobals.topLevelApplication.systemManager.isFontFaceEmbedded(objFormat);
_objRotTimer = new Timer(50);
_objRotTimer.addEventListener(TimerEvent.TIMER, OnRotTimerTick);
_objRotTimer.start();
}
protected function OnRotTimerTick(objEvent:Event):void
{
_txtFTE.x = (ucFTEHolder.width - _txtFTE.width) * .5;
_txtFTE.y = (ucFTEHolder.height- _txtFTE.height) * .5;
_txtFTE.rotation += 1;
_lblSpark.rotation += 1;
_lblMX.rotation +=1;
}
]]>
</fx:Script>
<s:VGroup width="100%" height="100%" paddingLeft="5" paddingRight="5" paddingTop="5" paddingBottom="5">
<s:Label id="lblEmbeded"/>
<s:HGroup width="100%" height="100%">
<s:Group id="grpMXLabel" width="100%" height="100%">
<mx:Label id="_lblMX" text="Texting MX" fontFamily="fntEmbededHelveticaNotCFF" fontSharpness="-50" fontThickness="120" fontSize="12" horizontalCenter="0" verticalCenter="0"/>
</s:Group>
<s:Group width="100%" height="100%">
<s:Label id="_lblSpark" text="Testing Spark" fontFamily="fntEmbededHelveticaCFF" horizontalCenter="0" verticalCenter="0" fontSize="12"/>
</s:Group>
<mx:UIComponent id="ucFTEHolder" width="100%" height="100%"/>
</s:HGroup>
</s:VGroup>
</s:Application>
