2012-07-23 38 views
0

有没有办法关闭使用嵌入字体的抗锯齿功能?我使用下面的代码,但遗憾的是我没有看到Actionscript 3参考中的任何选项,在混合使用位图文本[无反锯齿]选项的情况下使用动态文本字段时,可以实现相同的结果。在flash中禁用嵌入字体的文本字体别名cs5

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

任何想法?

回答

0

我一直在寻找这样做也是为我有,除非“抗混叠”下拉设置为“日本的文字不是无数临渲染一个奇怪的问题CS6 TextField属性检查器中的位图文本[no anti-alias]' - 但似乎没有办法通过ActionScript选择此设置...!

有趣的尝试上了比实例名称和该设置,然后做测试影片>调试>单变量,得到了下面的输出相同的其他阶段创建两个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”属性之外,没有其他两者之间的实际区别 - 我不相信这真的是在做什么?