字体嵌入不起作用还是?

发布于 2024-09-16 19:42:34 字数 604 浏览 8 评论 0原文

所以 - 我有这个奇怪的问题。

我有一个主要项目,除了它被分割为许多 SWF 之外不需要任何详细信息,因此 - 我想使用共享库来嵌入字体。完成 - sl_fonts.swf 加载,字体 - 检查并工作,其余的 SWF 在之后加载(由预加载器检查)。

现在,我再次跟踪字体请求的结果,它就像

DEBUG: REQUEST ArialBlack RETURN [class EMArialBlack] (main.swf)
DEBUG: GOT [class EMArialBlack] (loaded.swf)

为 ArialBlack 请求的加载的 SWF 文件一样,似乎得到了答案 - EMArialBlack,这是嵌入字体的类。

奇怪的是,当我将此返回到 TextFormat 的 .font 时,它实际上不起作用。我什至在将 TextFormat.font 设置为返回后跟踪它。它实际上追踪了[EMArialBlack 类]。但是当我将此 TextFormat 设置为 TextField 时它不起作用?如果 embedFonts 关闭,则没有结果(它保留旧的 _sans 占位符字体)。如果打开,则根本不显示任何文本。

有什么想法为什么会发生这种情况吗?

So - I have this weird problem.

I have a major project, no details needed except that it is split to many SWFs, and so - I would like to use a Shared Library to embed the fonts. Done - sl_fonts.swf loaded, fonts - checked and working, the rest of the SWFs are loaded AFTER (checked by a preloader).

Now - again, I traced the result of the request to the font, it is all like

DEBUG: REQUEST ArialBlack RETURN [class EMArialBlack] (main.swf)
DEBUG: GOT [class EMArialBlack] (loaded.swf)

The loaded SWF file requested for ArialBlack and it seems that it got an answer - EMArialBlack, which is the embedded font's class.

The weird thing is that when I put this return to a TextFormat's .font, it does not really work. I even traced the TextFormat.font after setting it to the return. It actually traced [class EMArialBlack]. BUT when I set this TextFormat to a TextField it does not work? If embedFonts is off, it has no result (it keeps the old _sans placeholder font). If it is on, no text is shown at all.

Any ideas why this is happening?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

栖迟 2024-09-23 19:42:34

.font = 字符串值(字体名称)

var format1:TextFormat = new TextFormat();
format1.font="Arial";
format1.size=12;
var result:TextField = new TextField();
result.embedFonts=true;
result.antiAliasType=AntiAliasType.ADVANCED;
result.text="This text uses a gridFitType of " + tl;
result.setTextFormat(fm);

alt text

.font = string value (font name)

var format1:TextFormat = new TextFormat();
format1.font="Arial";
format1.size=12;
var result:TextField = new TextField();
result.embedFonts=true;
result.antiAliasType=AntiAliasType.ADVANCED;
result.text="This text uses a gridFitType of " + tl;
result.setTextFormat(fm);

alt text

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文