[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.drawing

Font size rendering on different machines

steveboey

10/17/2004 9:07:00 PM

Hi all,

I have a web app which uses the DrawString method in the Graphics
class to create a PNG graphic with text on it. The problem I'm having
is with the font sizing/spacing. For example, on my local machine, I
could fit 50 characters a rectangle of x inch. But when I deploy it
to the server, it fits 60 characters on that rectangle. The screen
resolution for both my local machine and the server is set to
1600x1200. Help!

SB
2 Answers

Bob Powell

10/18/2004 5:44:00 AM

0

The PNG created on the server should be of a specific pixel resolution and
dimension. The client machines must be displaying things differently,
possibly due to a non plug-and-play monitor being used on one or other
client.

Force the server to create an image of a specific size and resolution. See
the GDI+ FAQ for details on how to create images with a specific resolution.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdipl...

The GDI+ FAQ RSS feed: http://www.bobpowell.net/f...
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tips...
Bob''s Blog: http://bobpowelldotnet.blogspot.co...






"Steve B" <steveboey@hotmail.com> wrote in message
news:dc6d79eb.0410171306.2f0e302c@posting.google.com...
> Hi all,
>
> I have a web app which uses the DrawString method in the Graphics
> class to create a PNG graphic with text on it. The problem I''m having
> is with the font sizing/spacing. For example, on my local machine, I
> could fit 50 characters a rectangle of x inch. But when I deploy it
> to the server, it fits 60 characters on that rectangle. The screen
> resolution for both my local machine and the server is set to
> 1600x1200. Help!
>
> SB


steveboey

10/18/2004 7:25:00 PM

0

Are you referring to the BitMap.SetResolution method? Thanks again in advance :-)

SB


"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message news:<OVoi0WNtEHA.3004@TK2MSFTNGP10.phx.gbl>...
> The PNG created on the server should be of a specific pixel resolution and
> dimension. The client machines must be displaying things differently,
> possibly due to a non plug-and-play monitor being used on one or other
> client.
>
> Force the server to create an image of a specific size and resolution. See
> the GDI+ FAQ for details on how to create images with a specific resolution.
>
> --
> Bob Powell [MVP]
> Visual C#, System.Drawing
>
> Answer those GDI+ questions with the GDI+ FAQ
> http://www.bobpowell.net/gdipl...
>
> The GDI+ FAQ RSS feed: http://www.bobpowell.net/f...
> Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tips...
> Bob's Blog: http://bobpowelldotnet.blogspot.co...
>
>
>
>
>
>
> "Steve B" <steveboey@hotmail.com> wrote in message
> news:dc6d79eb.0410171306.2f0e302c@posting.google.com...
> > Hi all,
> >
> > I have a web app which uses the DrawString method in the Graphics
> > class to create a PNG graphic with text on it. The problem I'm having
> > is with the font sizing/spacing. For example, on my local machine, I
> > could fit 50 characters a rectangle of x inch. But when I deploy it
> > to the server, it fits 60 characters on that rectangle. The screen
> > resolution for both my local machine and the server is set to
> > 1600x1200. Help!
> >
> > SB