Monthly Archives: March 2016

Using custom fonts in C# application

Recently I wanted to embed custom fonts in my application. After some googling and mixing the solution is this [DllImport(“gdi32.dll”)] private static extern IntPtr AddFontMemResourceEx(IntPtr pbFont, uint cbFont, IntPtr pdv, [In] ref uint pcFonts); public static PrivateFontCollection private_fonts = new PrivateFontCollection(); public static void LoadFont() { // Use this if you can not find your… Read More »