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: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jansen Bart
Sent: Thursday, September 20, 2007 3:28 PM
To: mono-list@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.

_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to