System.Drawing.Text.PrivateFontCollection fontcoll = new System.Drawing.Text.PrivateFontCollection();
fontcoll.AddFontFile(@”C:\badrobot\badrobot.ttf”);
System.Drawing.Font font = new System.Drawing.Font(“bad robot”, 20);
this.label1.Font = font;
fontcoll.Dispose();
In WinAPI, the same can be achieved using AddFontResourceEx() and RemoveFontResourceEx().
There is a wonderful resource Win32 to .NET Framework API Mapping which is great if you know a Win32 API and could not find a .NET solution or vice versa.