Tag Archives: embedded font

Using custom fonts in C# application revisited

I response to our article Using custom fonts in C# application from March 2016 we had question about loading multiple fonts.  After looking the the previous code I made few changes what makes it simpler and also allows to load more than one font. To see details  about embedding actual font files please see previous article. Used fonts… Read More »

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 »