【问题标题】:fonts not working any more (flex)字体不再工作(flex)
【发布时间】:2012-01-23 03:09:54
【问题描述】:

将我的 Flash 项目移动到 flex 时,我的字体搞砸了。它们不再出现(奇怪的是我没有收到任何错误消息)。

请 - 有人可以帮我解决这个问题吗?谢谢。

[Embed(source="../../../../../assets/fonts/Orbitron/TTF/orbitron-medium.ttf", fontFamily="Orbitron", fontWeight="medium", mimeType='application/x-font', embedAsCFF='false')]
public static const OrbitronMedium:Class;

private var font:String;
font = new Library.OrbitronMedium();

private var statsTxtFormat:TextFormat;
statsTxtFormat = new TextFormat();
statsTxtFormat.font = font;
statsTxtFormat.bold = false;
statsTxtFormat.size = 14;
statsTxtFormat.color = 0xfdfea1;
statsTxtFormat.align = TextFormatAlign.RIGHT;
statsTxtFormat.kerning = true;
statsTxtFormat.letterSpacing = 1;

【问题讨论】:

  • 尝试将您的字体加载到嵌套不太深的目录中。您可以尝试只使用一种字体来确定这是否是一个可行的解决方案。

标签: actionscript-3 apache-flex fonts


【解决方案1】:

看起来“../../../../../”可能是问题所在。

尝试将字体移近文件,这将减少错误嵌入的机会。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2011-02-22
  • 1970-01-01
  • 1970-01-01
  • 2012-07-01
  • 1970-01-01
  • 2013-03-16
  • 2012-04-11
  • 2018-06-01
相关资源
最近更新 更多