Code:
FontFamily fontFamily;
PrivateFontCollection pfc = new PrivateFontCollection();
GCHandle pMem = GCHandle.Alloc(Properties.Resources.The_Amazing_Spider_Man, GCHandleType.Pinned);
IntPtr fontPtr = pMem.AddrOfPinnedObject();
pfc.AddMemoryFont(fontPtr, Properties.Resources.The_Amazing_Spider_Man.Length);
uint pcFonts = 0; //useless
AddFontMemResourceEx(fontPtr, (uint)Properties.Resources.The_Amazing_Spider_Man.Length, IntPtr.Zero, ref pcFonts);
pMem.Free(); //Free unsafe memory
fontFamily = pfc.Families[0];
For use, just as I said before
Code:
for (int i = 0; i < this.Controls.Count; i++)
this.Controls[i].Font = new Font(fontFamily, 10, FontStyle.Regular);
(You can declare <fontFamily> globally to use it everywhere on the app with the previous cycle)