0
Answer

Embeding Fonts within my Program

mark c

mark c

13y
11.6k
1
  private void CreateFont()
{
byte[] fd = myapp.Properties.Resources.DANUBE;
unsafe
{
fixed (byte* pFontData = fd)
{
pfc.AddMemoryFont(new System.IntPtr((pFontData)), Convert.ToInt32(fd.Length));
}
}
}

private void Frm1_Load(object sender, EventArgs e)
{
CreateFont();
this.Font = new Font(pfc.Families[0], 8);

}
When I do: MessageBox.Show(this.Font.Name);
it says "Danube", but it doesn't look changed.
What's wrong with my code?
Next Recommended Forum