jaggie fonts on server, but not on local host

From: Michael Bodily (mikeb_at_gofuse.com)
Date: 02/14/05


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.



Relevant Pages

  • jaggie fonts on server, but not on local host
    ... user on one .aspx page and renders the message to a template .jpg and ... displays the results on a 2nd .aspx page. ... IIS ... Sub renderUserImage(ByVal srcImage As String, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: authentication mode=windows and forms togather in the same pro
    ... > when i use a different sub for another aspx page i have to convert this ... > to application in iis but then i get an error becouse it can't find the ... the only way i found to fix it is to copy the bin to the new sub as ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: WebDav and Excel doesnt work
    ... WebDAV and Authentication built into IIS should easily solve this problem ... Ricardo Almeida "David Wang " wrote:> If you are trying to make the ASPX page secure access to the .DOC and .XLS> files, then simply put the .DOC and .XLS files OUTSIDE of the website so> that they are completely inaccessible via a URL, and then write the ASPX> page to open and stream those file content > to the browser. ... > The fact that directory browsing affects behavior suggests that you have at> least some coding errors in your ASPX page that relies on URL-based access> to obtain the content> ... opens the file> and return it to the client... ...
    (microsoft.public.inetserver.iis)
  • Re: Error casting User.Identity to WindowsIdentity
    ... The folder is created inside ... Private Shared Sub DeleteDir ... OK, here's my ImpersonateUser class, defined in ImpersonateUser.vb:- ... I have tried passing the identity object from code behind of the aspx page ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How to... (ASP.NET / IIS 6.0 Newbie Question)
    ... The reason is because your code is in ASP.Net, and IIS needs to know to ... extensions, you can add Application Scriptmap for just those extensions and ... I have an ASP.NET app with aspx pages as the front end. ...
    (microsoft.public.inetserver.iis)