You can add the file that the font is in through the AddFontFile method
on the PrivateFontColl ection class. Once you have that, you can create a
new font class using the FontFamily that is exposed through the Families
property on the PrivateFontColl ection instance.
"Alex Davis" <alexdavis@bell south.net> wrote in message
news:eshDG8wlDH A.2364@TK2MSFTN GP11.phx.gbl...[color=blue]
> Does anyone know how use fonts that are NOT installed on the system?
> Alex
>
>[/color]
I use this... following is my code:
string fontFamily = "";FontFami ly[] fontFamilies;Pr ivateFontCollec tion pvtFontCollecti on = new PrivateFontColl ection();pvtFon tCollection.Add FontFile(Server .MapPath(Reques t.ApplicationPa th) + "\\fonts\\OLDEN GL.TTF");fontFa milies = pvtFontCollecti on.Families;fon tFamily = fontFamilies[0].Name;lblMessag e.Text += fontFamily; //Old English Text MTFont fancyFont = new Font(fontFamily , 50, FontStyle.Regul ar, GraphicsUnit.Pi xel);lblMessage .Text += fancyFont.Name; //Microsoft Sans Seriftext = "Certificat e of Completion";sta rt = GetPrintStartPo sition(text, fancyFont, objGraphic, objBitmap);objG raphic.DrawStri ng(text, fancyFont, blackBrush, start + 2, _base); // This is still printing Ariel_base += 150;Am I missing something?
"Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard .caspershouse.c om> wrote in message news:%23d8Y5Axl DHA.964@TK2MSFT NGP10.phx.gbl.. .[color=blue]
> Alex,
>
> You can add the file that the font is in through the AddFontFile method
> on the PrivateFontColl ection class. Once you have that, you can create a
> new font class using the FontFamily that is exposed through the Families
> property on the PrivateFontColl ection instance.
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - mvp@spam.guard. caspershouse.co m
>
> "Alex Davis" <alexdavis@bell south.net> wrote in message
> news:eshDG8wlDH A.2364@TK2MSFTN GP11.phx.gbl...[color=green]
> > Does anyone know how use fonts that are NOT installed on the system?
> > Alex
> >
> >[/color]
>
>[/color]
Ok... I have the solution... instead of using the string fontName, I used
the fontFamily[] instead when building the new font.
"Alex Davis" <alexdavis@bell south.net> wrote in message
news:eshDG8wlDH A.2364@TK2MSFTN GP11.phx.gbl...[color=blue]
> Does anyone know how use fonts that are NOT installed on the system?
> Alex
>
>[/color]
Comment