[lnkForumImage]
TotalShareware - Download Free Software

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


 

Yoav Ben-Yosef

10/16/2004 4:24:00 PM

Hello,

I'm using DrawString to write text on a panel surface. Here is a screenshot
of the form: http://www.geocities.com/benyosefyoav/im...

It seems that when using proportional font (MS Sans Serif) the space char
width changes. Is there any way to fix this?

TIA


2 Answers

Bob Powell

10/16/2004 6:18:00 PM

0

Drawstring will often misbehave in this manner when using the default font
hinting.

Use a minimum of TextRenderingHint.SingleBitPerPixelGridFit and ensure that
you use StringFormat.GenericTypographic.

There is an article on this in knowlegebase (KB307208) search for "Why text
appears different when drawn with GDIPlus versus GDI"

--
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...






"Yoav Ben-Yosef" <yoav_by@bezeqint.net> wrote in message
news:uzp9Jy5sEHA.2196@TK2MSFTNGP14.phx.gbl...
> Hello,
>
> I''m using DrawString to write text on a panel surface. Here is a
screenshot
> of the form: http://www.geocities.com/benyosefyoav/im...
>
> It seems that when using proportional font (MS Sans Serif) the space char
> width changes. Is there any way to fix this?
>
> TIA
>
>


Yoav Ben-Yosef

10/16/2004 8:55:00 PM

0

Thanks for answering.

Setting SingleBitPerPixelGridFit didn''t solve the problem. AntiAlias did,
but the letters appeared smeared. SingleBitPerPixel also worked, but the
display quality became almost unreadable.


"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:OixSWy6sEHA.3564@tk2msftngp13.phx.gbl...
> Drawstring will often misbehave in this manner when using the default font
> hinting.
>
> Use a minimum of TextRenderingHint.SingleBitPerPixelGridFit and ensure
> that
> you use StringFormat.GenericTypographic.
>
> There is an article on this in knowlegebase (KB307208) search for "Why
> text
> appears different when drawn with GDIPlus versus GDI"
>
> --
> 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...
>
>
>
>
>
>
> "Yoav Ben-Yosef" <yoav_by@bezeqint.net> wrote in message
> news:uzp9Jy5sEHA.2196@TK2MSFTNGP14.phx.gbl...
>> Hello,
>>
>> I''m using DrawString to write text on a panel surface. Here is a
> screenshot
>> of the form: http://www.geocities.com/benyosefyoav/im...
>>
>> It seems that when using proportional font (MS Sans Serif) the space char
>> width changes. Is there any way to fix this?
>>
>> TIA
>>
>>
>
>