mark c

mark c

  • NA
  • 14
  • 48.5k

Embeding Fonts within my Program

Jan 18 2011 7:41 PM
  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?