Hi Localhost,
As for your question, I think the GDI+ components under the System.Drawing
/System.Drawing. Text namespace can finish the task. Also, w can use the
"PrivateFontCol lection" class to load a (true type font) ttf file from disk
into memory and create a tempory font instance so as to use it(without
installed in the system's font library), here is a simple code snippet.
Hope helps:
=============== =============== =======
private void Page_Load(objec t sender, System.EventArg s e)
{
try
{
System.Drawing. Text.PrivateFon tCollection pfc = new
PrivateFontColl ection();
pfc.AddFontFile (Server.MapPath ("DarkGardenMK. ttf"));
FontFamily family=new FontFamily("Dar k Garden",pfc);
Font dgFont=new Font(family,40) ;
Bitmap tmpBitmap = new Bitmap(400,100, PixelFormat.For mat32bppArgb);
Graphics objGraphics = Graphics.FromIm age(tmpBitmap);
objGraphics.Dra wString("Hello World!", dgFont, new
SolidBrush(Colo r.White ),0,0);
Response.Clear( );
Response.Conten tType = "image/jpeg";
tmpBitmap.Save( Response.Output Stream,ImageFor mat.Jpeg);
Response.End();
tmpBitmap.Dispo se();
}
catch(Exception ex)
{
Response.Write( "<br>" + ex.Message);
}
}
=============== =============== ==============
In addtion, below is the codeproject article I refer to , that has the more
detailed explanition.
#C# Barcode Generator WebService
http://www.thecodeproject.com/cs/web.../wsbarcode.asp
Hope helps. Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)