jaggie fonts on server, but not on local host
From: Michael Bodily (mikeb_at_gofuse.com)
Date: 02/14/05
- Next message: Jason Follas: "ColorTranslator.FromHTML not working with Color Name"
- Previous message: Picho: "Not-Installed-fonts question"
- Next in thread: WALDO: "Re: jaggie fonts on server, but not on local host"
- Reply: WALDO: "Re: jaggie fonts on server, but not on local host"
- Messages sorted by: [ date ] [ thread ]
Date: 14 Feb 2005 11:45:16 -0800
Hi all,
I have written an Ecard application which takes text input from the
user on one .aspx page and renders the message to a template .jpg and
displays the results on a 2nd .aspx page. The trouble is that my fonts
render fine on my local host machine but very jaggie on the server. IIS
5.1 is being used on my local host and our server is running windows
2000, IIS 5.0. However, my IT guy tells me there is no fundamental
differences between the two and it shouldn't affect my drawing output.
Here is my code:
===========================
Sub renderUserImage(ByVal srcImage As String, ByVal destImage As
String)
Dim strFileName, newImagePath As String
newImagePath = Server.MapPath("EcardsRendered/" & destImage &
".jpg")
strFileName = srcImage
Dim newImageFormat As System.Drawing.Imaging.ImageFormat
newImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg
' create New image and bitmap objects.
Dim i As System.Drawing.Image =
System.Drawing.Image.FromFile(strFileName)
' Render the users messag here
Dim g As Graphics = Graphics.FromImage(i)
g.SmoothingMode = Drawing2D.SmoothingMode.HighQuality
g.InterpolationMode = Drawing.Drawing2D.InterpolationMode.High
Dim sf As StringFormat =
CType(StringFormat.GenericTypographic.Clone(), StringFormat)
sf.Alignment = StringAlignment.Center ' near, far or
center (paragraph)
sf.LineAlignment = StringAlignment.Center
' Fontsize adjustments:
If Me.UserFont = 0 Then
Me.DynFontSize = DynFontSize + 1
End If
If Me.UserFont = 1 Then
Me.DynFontSize = DynFontSize - 1
End If
If Me.UserFont = 3 Then
Me.DynFontSize = DynFontSize + 2
End If
' Build the drawstring dynamically:
g.DrawString(UserMessage, New Font(StrChosenFont, DynFontSize,
FontStyle.Regular), Brushes.Black, New RectangleF(354, 58, 224, 274),
sf)
g.Dispose()
end sub
==============================
any help would be appreciated.
thanks,
michael bodily
mikeb@gofuse.com
fuse interactive, inc.
- Next message: Jason Follas: "ColorTranslator.FromHTML not working with Color Name"
- Previous message: Picho: "Not-Installed-fonts question"
- Next in thread: WALDO: "Re: jaggie fonts on server, but not on local host"
- Reply: WALDO: "Re: jaggie fonts on server, but not on local host"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|