Is there any way to use an embedded font on the Grid?
I've tried loading up my own font using this method
PrivateFontCollection pfc = new PrivateFontCollection();
Assembly assembly = this.GetType().Assembly;
using (Stream fontStream = assembly.GetManifestResourceStream("....font.ttf"))
if (null != fontStream)
int fontStreamLength = (int)fontStream.Length;
IntPtr data = Marshal.AllocCoTaskMem(fontStreamLength);
byte fontData = new byte[fontStreamLength];
fontStream.Read(fontData, 0, fontStreamLength);
Marshal.Copy(fontData, 0, data, fontStreamLength);
Font newFont = new Font(pfc.Families, 8, FontStyle.Regular);
m_grid.Font = newFont;
And the grid eventually throws an error about GetName on the font family. Any suggestions?
I'm not really all that familiar with embedding fonts, but I can't see any reason the grid would be any different than any other control in this regard. In fact, the Font property is not a property on the grid, it's a property on Control.
Does you font work with any other controls?