Search code examples
vb.netfontsembedded-resource

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. 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. I found this online:

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. Should I have to put the font in the resources or what?

Thanks in advance.


Solution

  • Myriad Pro is an OpenType font. Only WPF supports such fonts, Winforms requires a TrueType font.

    Just one hint, when you copy Apple fonts then be sure to not be successful. Apple has a lot of lawyers and isn't afraid to use them. Especially when the font is used for their corporate logo.