0

有没有办法关闭嵌入字体的抗锯齿功能?我正在使用以下代码,但遗憾的是我在 Actionscript 3 参考中没有看到任何选项,当使用动态文本字段并在 Aliasing 下选择了 Bitmap text [no anti-alias] 选项时,我可以获得相同的结果.

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);

有任何想法吗?

4

2 回答 2

1

根据 Adob​​e 提供的文档,您无法关闭嵌入字体的抗锯齿:“嵌入字体是抗锯齿的,这意味着它们的边缘被平滑以便于阅读。这在文本较大时尤其明显。” 您可以在此处更详细地查看它:http: //livedocs.adobe.com/flex/3/html/help.html?content= fonts_04.html

于 2012-07-23T14:37:51.053 回答
0

我也一直在寻找这样做,因为我有一个奇怪的问题,即日文文本无法在 Myriad Pro 中呈现,除非 CS6 TextField 属性中的“抗锯齿”下拉菜单设置为“位图文本 [无抗锯齿]”检查器 - 但似乎没有任何方法可以通过 ActionScript 选择此设置...!

有趣的是,尝试在舞台上创建两个除了实例名称和此设置之外相同的 TextField,然后测试电影 > 调试 > 列出变量并得到以下输出:

对于使用“位图文本”作为抗锯齿设置的 TextField:

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

对于以“动画抗锯齿”作为抗锯齿设置的 TextField:

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

如您所见,除了“对象#1”、“对象#2”属性之外,两者之间没有明显的区别—​​—我不敢相信这真的有什么作用吗?

于 2013-11-12T17:10:36.740 回答