`
strugglesMen
  • 浏览: 112263 次
  • 性别: Icon_minigender_2
  • 来自: 杭州
社区版块
存档分类
最新评论

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

阅读更多

在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" 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics