有没有办法用嵌入字体关闭抗锯齿?我正在使用下面的代码,但遗憾的是我在Actionscript 3参考中没有看到任何选项,在使用动态文本字段并且在别名下选择了位图文本[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);
有什么想法吗?
答案 0 :(得分:1)
根据Adobe提供的文档,您无法关闭嵌入字体的抗锯齿:“嵌入字体是消除锯齿的,这意味着它们的边缘被平滑以便于阅读。这在文本中尤为明显尺寸很大。“您可以在此处详细查看:http://livedocs.adobe.com/flex/3/html/help.html?content=fonts_04.html
答案 1 :(得分:0)
我一直在寻找这样做,因为我有一个奇怪的问题,日语文本没有在Myriad Pro中呈现,除非'抗别名'下拉菜单设置为'Bitmap text [no anti-alias]' CS6 TextField属性检查器 - 但似乎没有办法通过ActionScript选择此设置......!
有趣的是尝试在舞台上创建两个与实例名称和此设置不同的TextField,然后测试影片> debug>列出变量并获得以下输出:
对于带有“位图文本”作为抗锯齿设置的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'属性之外,两者之间没有任何实质性区别 - 我无法相信它真的在做什么?