简体   繁体   English

在VB.net中使用自定义字体

[英]Use custom fonts in VB.net

I am trying to make a GUI like a iPad/iPhone, so to be able to make it look good, of course you need to use a font like Apple. 我试图制作像iPad / iPhone一样的GUI,所以为了能够让它看起来不错,当然你需要使用像Apple这样的字体。 I have downloaded it - MyriadPro-Semibold and put it in the control panel font's folder, but when selecting a font, it is not there. 我已下载它 - MyriadPro-Semibold并将其放在控制面板字体的文件夹中,但在选择字体时,它不存在。 I found this online: 我在网上发现了这个:

Label1.Font = Resources.GetFont(Resources.FontResources.MyriadPro-Semibold) Label1.Font = Resources.GetFont(Resources.FontResources.MyriadPro-Semibold)

I suspect it is C (minus the ";" at the end of the line), but I don't know. 我怀疑它是C(减去行尾的“;”),但我不知道。 Should I have to put the font in the resources or what? 我应该把字体放在资源中还是什么?

Thanks in advance. 提前致谢。

Myriad Pro is an OpenType font. Myriad Pro是一种OpenType字体。 Only WPF supports such fonts, Winforms requires a TrueType font. 只有WPF支持这种字体,Winforms需要TrueType字体。

Just one hint, when you copy Apple fonts then be sure to not be successful. 只需一个提示,当您复制Apple字体时,请务必不要成功。 Apple has a lot of lawyers and isn't afraid to use them. Apple有很多律师,并且不怕使用它们。 Especially when the font is used for their corporate logo. 特别是当字体用于他们的公司徽标时。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM