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?