【问题标题】:Apply embedded fonts to special characters in spark textArea using TextLayoutFormat使用 TextLayoutFormat 将嵌入字体应用于 spark textArea 中的特殊字符
【发布时间】:2012-02-15 01:57:00
【问题描述】:

通过将 fontfamily 直接设置为 mxml 中的 textarea 字体可以应用于特殊字符。但是使用 tlf 和设置 fontfamily 它并不适用。

style.css ::

@font-face

{

    src: URL("/Assets/Fonts/GandhariUnicode-Bold.otf");

    fontFamily: "GandhariUnicode-Bold";

    embedAsCFF: true;

}

源代码的sn-p ::

textArea.textFlow.interactionManager.selectRange(beginIndex, endIndex);

var textLayoutFormat:TextLayoutFormat = getTextLayoutFormat();

textLayoutFormat.fontLookup = FontLookup.EMBEDDED_CFF;

textLayoutFormat.fontFamily ="GandhariUnicode-Bold";    

textLayoutFormat.renderingMode = RenderingMode.CFF;

【问题讨论】:

    标签: apache-flex textarea


    【解决方案1】:

    嵌入式字体的行为可能很奇怪。我看到您使用的是粗体字体,您是否尝试过在嵌入字体或/和 TextLayoutFormat 对象时将字体粗细设置为粗体?

    另外,我发现这个帖子可能很有用:http://forums.adobe.com/thread/635711

    【讨论】:

      【解决方案2】:

      您是否尝试过仅设置 fontFamily 就这样?也添加正常的字体粗细定义,看看有什么变化。

      【讨论】:

      猜你喜欢
      • 2013-05-21
      • 1970-01-01
      • 2012-02-28
      • 2014-06-20
      • 1970-01-01
      • 1970-01-01
      • 2018-09-26
      • 2011-01-19
      • 2012-08-23
      相关资源
      最近更新 更多