Cocoa:从网上下载的字体

发布于 2024-10-08 10:00:05 字数 229 浏览 0 评论 0原文

我正在编写一个应用程序,该应用程序需要系统上不可用的字体。我从网络上获取了字体,但每次启动应用程序时,我都会收到以下消息:

http://twitpic.com/ 3h4nj9

我无法发布包含此类消息的应用程序。我相信这是字体文件上的一些元数据。有谁知道我该如何解决这个问题?

谢谢!

I'm coding an app that needs a font that is not available on the system. I got the font from the web, but every time I launch the app, I get this message:

http://twitpic.com/3h4nj9

I cannot ship an app with this kind of message. I believe it's some metadata on the font file. Does anyone knows how can I solve that problem?

Thanks!

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

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

发布评论

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

评论(1

还如梦归 2024-10-15 10:00:05

这是操作系统的一项安全功能。你不应该试图“解决”它。

我建议获取该字体的许可证并将该文件捆绑为应用程序中的资源。或者不做。

[编辑]:我误解了。由于它是您包含在捆绑包中的文件,因此您希望从该文件中清除 com.apple.quarantine 元数据。使用命令

xattr -d com.apple.quarantine my_font_file.otf

您可能还想删除 com.apple.metadata:kMDItemWhereFroms 元数据。

您可以使用它

xattr my_font_file.otf 

来获取操作系统在文件上保留的所有扩展属性的列表。根据需要删除(使用 -d 标志)。

This is a security feature of the OS. You should not be trying to "solve" it.

I'd suggest obtaining a license for the font and bundling the file as a resource in your app. Or do without.

[EDIT]: I misunderstood. Since it's a file you're including in your bundle, you want to clear the com.apple.quarantine metadata from the file. Use the command

xattr -d com.apple.quarantine my_font_file.otf

You probably also want to get rid of the com.apple.metadata:kMDItemWhereFroms metadata as well.

You can just use

xattr my_font_file.otf 

to get a list of all the extended attributes that the OS is keeping on the file. Delete as appropriate (with the -d flag).

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