[Mono-list] MeasureString

Maser, Dan Dan.Maser at inin.com
Thu Sep 20 17:02:38 EDT 2007


 
  It might be a real issue, but my app has the need to measure strings
too and I've found that MeasureString is often quite wrong.  The MSDN
docs indicate that it often is too, and recommends using
Graphics.MeasureCharacterRanges instead.   You might consider trying
that approach as a work-around.   I know that I've removed all
references to MeasureString in my app in favor of MeasureCharacterRanges
which is far more reliable for me.

________________________________

From: mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Jansen Bart
Sent: Thursday, September 20, 2007 3:28 PM
To: mono-list at lists.ximian.com
Subject: [Mono-list] MeasureString



Hi all,

 

I'm trying to ensure that a string fits in a rectangle shown on screen,
so whenever the string is too long, some characters are stripped.  I'm
using MeasureString to accomplish this.  With mono under windows this is
working fine, under linux the resulting string is always way too long.
Is this a known issue? Is there a workaround?

 

Thanks a lot for your help,

 

B.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20070920/9e52dc53/attachment-0001.html 


More information about the Mono-list mailing list