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
"PrivateFontCollection" 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(object sender, System.EventArgs e)
{
try
{
System.Drawing.Text.PrivateFontCollection pfc = new
PrivateFontCollection();
pfc.AddFontFile(Server.MapPath("DarkGardenMK.ttf"));
FontFamily family=new FontFamily("Dark Garden",pfc);
Font dgFont=new Font(family,40);
Bitmap tmpBitmap = new Bitmap(400,100,PixelFormat.Format32bppArgb);
Graphics objGraphics = Graphics.FromImage(tmpBitmap);
objGraphics.DrawString("Hello World!", dgFont, new
SolidBrush(Color.White ),0,0);
Response.Clear();
Response.ContentType = "image/jpeg";
tmpBitmap.Save(Response.OutputStream,ImageFormat.Jpeg);
Response.End();
tmpBitmap.Dispose();
}
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/webservices/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.)