I use this... following is my code:
string fontFamily = "";FontFamily[] fontFamilies;PrivateFontCollection pvtFontCollection = new PrivateFontCollection();pvtFontCollection.AddFontF ile(Server.MapPath(Request.ApplicationPath) + "\\fonts\\OLDENGL.TTF");fontFamilies = pvtFontCollection.Families;fontFamily = fontFamilies[0].Name;lblMessage.Text += fontFamily; //Old English Text MTFont fancyFont = new Font(fontFamily, 50, FontStyle.Regular, GraphicsUnit.Pixel);lblMessage.Text += fancyFont.Name; //Microsoft Sans Seriftext = "Certificate of Completion";start = GetPrintStartPosition(text, fancyFont, objGraphic, objBitmap);objGraphic.DrawString(text, fancyFont, blackBrush, start + 2, _base); // This is still printing Ariel_base += 150;Am I missing something?
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:%2***************@TK2MSFTNGP10.phx.gbl...
Alex,
You can add the file that the font is in through the AddFontFile method
on the PrivateFontCollection class. Once you have that, you can create a
new font class using the FontFamily that is exposed through the Families
property on the PrivateFontCollection instance.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Alex Davis" <al*******@bellsouth.net> wrote in message
news:es**************@TK2MSFTNGP11.phx.gbl... Does anyone know how use fonts that are NOT installed on the system?
Alex