Cocoa:从网上下载的字体
我正在编写一个应用程序,该应用程序需要系统上不可用的字体。我从网络上获取了字体,但每次启动应用程序时,我都会收到以下消息:
我无法发布包含此类消息的应用程序。我相信这是字体文件上的一些元数据。有谁知道我该如何解决这个问题?
谢谢!
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:
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是操作系统的一项安全功能。你不应该试图“解决”它。
我建议获取该字体的许可证并将该文件捆绑为应用程序中的资源。或者不做。
[编辑]:我误解了。由于它是您包含在捆绑包中的文件,因此您希望从该文件中清除 com.apple.quarantine 元数据。使用命令
您可能还想删除 com.apple.metadata:kMDItemWhereFroms 元数据。
您可以使用它
来获取操作系统在文件上保留的所有扩展属性的列表。根据需要删除(使用 -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
You probably also want to get rid of the com.apple.metadata:kMDItemWhereFroms metadata as well.
You can just use
to get a list of all the extended attributes that the OS is keeping on the file. Delete as appropriate (with the -d flag).