0
votes

Is there a way to turn off anti aliasing with embedded fonts? I'm using the following code, but sadly I don't see any options in the Actionscript 3 reference, where I can achieve the same results when using a dynamic text field with the Bitmap text [no anti-alias] option selected under Aliasing.

TF = new TextField();
TF.embedFonts = true;
TF.selectable = false;
TF.defaultTextFormat = new TextFormat(_font, _fontSize, _fontColor);
TF.autoSize = TextFieldAutoSize.LEFT;
TF.height = _maskHeight;
TF.x = _maskWidth;
TF.text = getNextMessage();
TF.antiAliasType = AntiAliasType.ADVANCED;
addChild(TF);

Any ideas?

2

2 Answers

1
votes

Based on the document provided by Adobe, you can't turn off anti-aliasing for embedded font: "Embedded fonts are anti-aliased, which means that their edges are smoothed for easier readability. This is especially apparent when the text size is large." You can see it in more detailed here: http://livedocs.adobe.com/flex/3/html/help.html?content=fonts_04.html

0
votes

I've been looking to do this too as I have a weird problem with Japanese text not rendering in Myriad Pro unless the 'anti-alias' drop down is set to 'Bitmap text [no anti-alias]' in the CS6 TextField property inspector - but there doesn't seem any way to choose this setting via ActionScript...!

Interestingly tried creating two TextFields on the stage that were identical other than the instance name and this setting, then did test movie > debug > list variables and got the following output:

For the TextField with 'Bitmap text' as the anti-alias setting:

Edit Text: Target="_level0.bitmaptext_txt"
textColor = 0, multiline = true, scroll = 1,
antiAliasType = "normal",
mouseWheelEnabled = true, variable = null, restrict = null,
gridFitType = "pixel",
selectable = false, bottomScroll = 1, filters = [object #1, class 'Array'] [], background = false,
maxhscroll = 0, styleSheet = undefined,
type = "dynamic",
autoSize = "none",
textWidth = 98, wordWrap = true, maxChars = null, hscroll = 0,
thickness = 0, borderColor = 0, html = false, backgroundColor = 16777215,
condenseWhite = false,
text = "hello world",
htmlText = "hello world",
sharpness = 0, textHeight = 26, border = false, password = false,
embedFonts = true, length = 11, tabIndex = undefined, maxscroll = 1

For the TextField with 'Anti-alias for animation' as the anti-alias setting:

Edit Text: Target="_level0.antialiasanimation_txt"
textColor = 0, multiline = true, scroll = 1,
antiAliasType = "normal",
mouseWheelEnabled = true, variable = null, restrict = null,
gridFitType = "pixel",
selectable = false, bottomScroll = 1, filters = [object #2, class 'Array'] [], background = false,
maxhscroll = 0, styleSheet = undefined,
type = "dynamic",
autoSize = "none",
textWidth = 93, wordWrap = true, maxChars = null, hscroll = 0,
thickness = 0, borderColor = 0, html = false, backgroundColor = 16777215,
condenseWhite = false,
text = "hello world",
htmlText = "hello world",
sharpness = 0, textHeight = 26, border = false, password = false,
embedFonts = true, length = 11, tabIndex = undefined, maxscroll = 1

As you can see, there's no tangible difference between the two other than the 'object #1', 'object #2' properties - I can't believe that's really doing anything?