如何正确发布带有字体文件的C#Windows应用程序? [英] How do you publish a C# Windows app with Font Files correctly?

查看:55
本文介绍了如何正确发布带有字体文件的C#Windows应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经坚持了很长时间.我已经搜索并找到了如何使用Windows Installer和oneclick发布应用程序,但这不能解决我的问题.我创建了一个非常简单的C#Windows应用程序,该应用程序将用户的输入转换为其他语言.该语言是逐字母的,因此无需考虑困难的发音或结构.该程序只使用Times New Roman字体获取输入,并以另一种语言的特殊字体输出它.效果很好.直到将它带到另一台计算机并安装它,才发现字体不存在.我的问题是如何将字体文件添加到安装程序以供目标系统使用?这可能吗?

I have been stuck on this for quite some time. I have searched and found how to publish apps using the windows installer and the oneclick but this does not solve my problem. I created a very simple C# Windows app that takes the user's input and converts it to a different language. The language is letter-by-letter so there is no difficult pronunciation or structure that has to be taken into account. The program simply takes the input in a Times New Roman font and outputs it in the special font for the other language. It works great. Until I take it to another computer and install it only to find that the fonts are not there. My question is how do you add the font files to the installer for the target system to use? Is this possible?

推荐答案

如果真正的原因是目标计算机上不存在该字体,则可以将一个自定义文件夹添加到安装项目中,该文件夹称为 Fonts文件夹.您可以在其中放置要与项目一起部署的所有字体依赖项.

If the true reason is that the font doesn't exist on the target machine, you can add a custom folder to your setup project called the Fonts Folder. There you can place any font dependencies you want deployed with your project.

这篇关于如何正确发布带有字体文件的C#Windows应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆