在 FontDialog C# 中获取字体文件名称/位置

发布于 2024-09-27 05:44:35 字数 219 浏览 1 评论 0原文

我需要做的是在 FontDialog 中选择字体后获得字体文件名(不是字体系列名称), 这样,如果我从对话框中选择“Harlow Solid Semi”,我需要获取文件名,即“HARLOWSI.TTF” 那么有可能吗?如果不使用fontDialog,可以用其他方式完成吗? 注意:我需要用户在选择字体之前查看字体的示例文本,因此直接列出 c:\windows\fonts 中的文件并不能解决问题。

提前致谢。

What i need to do is have the font file name (not Font Family name) after selecting a font in the FontDialog,
so that if i selected "Harlow Solid Semi" from the Dialog, i need to get the file name, which is "HARLOWSI.TTF"
so is it possible ? if not using the fontDialog, can it be done other way ?
Note: i need the user to see a sample text from the font before choosing it, so that listing the files in c:\windows\fonts directly will not solve the issue.

Thanks in Advance.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文