3

Is possible change the font of label in C# with a custom font. EX.: I need change the font to Bookman Old Style and in Visual Studio doesn't have this font.

Is possible add? How?

Ladessa
  • 985
  • 4
  • 24
  • 50
  • http://stackoverflow.com/questions/13573916/using-custom-fonts-in-my-winform-labels ? – Laurent S. Apr 10 '13 at 17:06
  • Stackoverflow is the answer! [Font in labels][1] [1]: http://stackoverflow.com/questions/4939255/c-sharp-how-to-change-font-of-a-label good job ;) – Raikoug Bolt Apr 10 '13 at 17:07

1 Answers1

5

Use the PrivateFontCollection to load the font (See the AddFontFile and AddMemoryFont). You then use the font normally for label control.

PrivateFontCollection pfc = new PrivateFontCollection();
pfc.AddFontFile("C:\\Path To\\YourFont.ttf");
label1.Font = new Font(pfc.Families[0], 16, FontStyle.Regular);
KF2
  • 9,887
  • 8
  • 44
  • 77