如何使用 WiX 删除字体

发布于 2024-08-22 18:07:33 字数 364 浏览 3 评论 0原文

我正在创建一个还需要删除 Arial 字体的安装程序(我被告知如果 Arial 被删除,将从缓存中重新创建它,而这正是我想要的)。有没有办法可以在 WiX 中执行此操作,或者我需要编写自定义操作?

更新: 我的安装程序的用户 90% 的情况下都会使用 Arial 的破解版本,该版本与 Web 浏览器的字体回退机制发生冲突。最好确认一下,如果我删除了 Arial,它会被重新创建,因为从技术上讲,未经许可我无法重新分发更新的 Arial 字体。

更新 2: 我能够将其删除,但是在 Fonts 文件夹中,Arial 字体仍然存在,但看起来是孤立的。也就是说,我可以看到它,但如果我双击它,它会说字体格式不正确。

I am creating an installer that also needs to delete the Arial font (I am told Arial will be recreated from a cache if it gets deleted, and that's exactly what I want). Is there a way that I can do this in WiX or will I need to write a custom action?

Update: Users of my installer will 90% of the time have a hacked version of Arial which conflicts with the font fall back mechanism of Web Browsers. It is good to confirm that Arial will be recreated if I deleted it, as technically I can not redistribute an updated Arial font without permission.

Update 2: I was able to delete it, however inside the Fonts folder the Arial font is still there but looks orphaned. That is I can see it, but if I doulbe click it it says font is of incorrect format.

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

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

发布评论

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

评论(1

鲜血染红嫁衣 2024-08-29 18:07:33

我认为这可行,即使我没有在评论中推荐它:

   <Directory Id="FontsFolder">
      <RemoveFile Id="RemoveArial" On="install" Name="Arial.ttf"/>
   </Directory>

I think this could work, even if i did not recommend it in my comment:

   <Directory Id="FontsFolder">
      <RemoveFile Id="RemoveArial" On="install" Name="Arial.ttf"/>
   </Directory>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文