如何让客户端没有字体也能访问这类型的字体类型

            PrivateFontCollection p_Font = new PrivateFontCollection();
            byte[] b_Font = new byte[WindowsFormsApplication1.Properties.Resources.impact.Length];
            IntPtr MeAdd = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(byte)) * b_Font.Length);
            Marshal.Copy(WindowsFormsApplication1.Properties.Resources.impact, 0, MeAdd, WindowsFormsApplication1.Properties.Resources.impact.Length);
            p_Font.AddMemoryFont(MeAdd, b_Font.Length);
            labelX1.Font = new Font(p_Font.Families[0], 18, FontStyle.Bold | FontStyle.Regular);

  其中WindowsFormsApplication1表示程序集 

  labelX1表示的控件

原文地址:https://www.cnblogs.com/liujie1111/p/4044727.html