您的位置:首页 > 其它

Flex4中关于无法构建字体错误

2016-06-14 12:05 344 查看
在Flex4中做一个项目,出现一个错误烦恼了一段时间,
代码是这样的:
[Embed(systemFont="宋体",
                fontName="myFont",
                mimeType="application/x-font")]
提示错误:
无法构建字体“myFont”
转 换代码时出现意外错误:Cannot embed local font '宋体' as CFF. The CSS @font-face 'local()' syntax is not supported. Please specify a path directly to a font file using the 'url()' syntax. For [Embed] syntax the 'systemFont' attribute is not supported. Please specify a path directly to a font file using the 'source' attribute.
 
通过一个网友的帮助,原来那是flex3中的方法,flex4中发生了变化
 
改过后的代码:
[Embed(systemFont="宋体",
          fontName="myFont5",
    mimeType="application/x-font-truetype",
    embedAsCFF="false" )]
flex4中需要加上
mimeType="application/x-font-truetype";
  embedAsCFF="false" 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: