在我的 winform 标签中使用自定义字体 [英] Using custom fonts in my winform labels

查看:59
本文介绍了在我的 winform 标签中使用自定义字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以为我的表单标签使用自定义字体而不在用户机器上安装它?我想使用我有权使用的字体显示文本,但该字体未安装在潜在用户计算机上.

I wonder if its possible to use a custom font for my form labels without installing it on the users machine? I would like to display a text using a font I have rights to, but its not installed on the potencial user machine.

有什么解决办法吗?

推荐答案

这里是摘录(使用 PrivateFontCollection):

Here is the extract (using PrivateFontCollection):

Dim pfc As New PrivateFontCollection()
pfc.AddFontFile("C:\Path To\PALETX3.ttf")
label1.Font = New Font(pfc.Families(0), 16, FontStyle.Regular)

从这里转换:加载无需安装即可使用自定义字体.

另请检查:在 .NET 应用程序中嵌入/部署自定义字体

这篇关于在我的 winform 标签中使用自定义字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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