Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created June 2, 2023 07:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/ad682a2764cf3bf2b2d785694fd57a04 to your computer and use it in GitHub Desktop.
Save bjoerntx/ad682a2764cf3bf2b2d785694fd57a04 to your computer and use it in GitHub Desktop.
using System.Runtime.InteropServices;
public class Fonts
{
[DllImport("gdi32", EntryPoint = "AddFontResource")]
public static extern int AddFontResourceA(string lpFileName);
[System.Runtime.InteropServices.DllImport("gdi32.dll")]
public static extern int AddFontResource(string lpszFilename);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment