Spark TextArea不显示嵌入字体
我似乎无法让 TextArea 渲染项目中的任何嵌入字体。我在网上搜索并发现了这个问题的几个实例,但没有解决方案。
我的应用程序中嵌入了一些字体。火花标签和mx:TextArea(将 embedAsCFF 切换为“false”)将正确显示它们,因此我知道它们已嵌入正常。我在绑定中有 fontFamily 值,但我什至尝试实例化一个新的 TextArea,然后通过 fontFamily 样式分配一种嵌入字体,但没有成功。有人经历过这个吗?
/* In my CSS file */
@font-face {
src:url("assets/fonts/UbuntuMono/UbuntuMono-Regular.ttf");
fontFamily: UbuntuMono;
embedAsCFF: true;
}
<!-- In my MXML -->
<s:TextArea fontFamily="UbuntuMono" text="TEST" fontSize="36"/>
<!-- TEST is just rendered as Verdana. Any suggestions? -->
I can't seem to get TextArea to render any embedded fonts in project. I've searched online and have found a couple of instances of this issue but no solutions.
I have a few fonts embedded with my app. Spark Label & the mx:TextArea (switching embedAsCFF to 'false') will display them correctly so I know they're embedded OK. I have the fontFamily value in a binding but I even tried just instantiating a new TextArea then assigning one the the embedded fonts via the fontFamily style and have had no luck. Has anyone experienced this?
/* In my CSS file */
@font-face {
src:url("assets/fonts/UbuntuMono/UbuntuMono-Regular.ttf");
fontFamily: UbuntuMono;
embedAsCFF: true;
}
<!-- In my MXML -->
<s:TextArea fontFamily="UbuntuMono" text="TEST" fontSize="36"/>
<!-- TEST is just rendered as Verdana. Any suggestions? -->
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据 Adobe 指南此处,Spark TextArea 要求嵌入的字体与 MX 版本不同。您可以在此讨论中查看更多信息。
对于替代解决方案,您还可以尝试这个。
According to Adobe guide here, Spark TextArea requires that fonts be embedded differently than the MX version. You can check more on it in this discussion.
For an alternate solution, you can also try this .
重新创建了项目,一切都很好。
Re-created the project and all was well.