【问题标题】:Disable text font aliasing with embedded fonts in flash cs5在 Flash cs5 中禁用嵌入字体的文本字体别名
【发布时间】:2013-11-13 01:10:36
【问题描述】:

有没有办法关闭嵌入字体的抗锯齿功能?我正在使用以下代码,但遗憾的是我在 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);

有什么想法吗?

【问题讨论】:

    标签: actionscript-3 flash


    【解决方案1】:

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

    【讨论】:

      【解决方案2】:

      我也一直在寻求这样做,因为我有一个奇怪的问题是日文文本无法在 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
      

      如您所见,除了 'object #1'、'object #2' 属性之外,两者之间没有明显的区别 - 我不敢相信这真的有什么作用?

      【讨论】:

        猜你喜欢
        • 2011-09-25
        • 1970-01-01
        • 1970-01-01
        • 2011-04-14
        • 2011-07-28
        • 1970-01-01
        • 2010-11-07
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多