[Mono-list] MeasureString

Steven Schulze sschulze at vmware.com
Thu Sep 20 17:23:45 EDT 2007


Hi,

I have found that TextRenderer.MeasureText(...) with the
TextFormatFlags.NoPadding flag gives accurate results on both Mono and .Net. 

Steven


> -----Original Message-----
> From: mono-list-bounces at lists.ximian.com 
> [mailto:mono-list-bounces at lists.ximian.com] On Behalf Of 
> Sebastien Pouliot
> Sent: Thursday, September 20, 2007 2:12 PM
> To: Jansen Bart
> Cc: mono-list at lists.ximian.com
> Subject: Re: [Mono-list] MeasureString
> 
> Hello Jansen,
> 
> On Thu, 2007-09-20 at 22:28 +0200, Jansen Bart wrote:
> > 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?
> > 
> 
> There are known issues (and bug reports) for some options. 
> Still the recent libgdiplus versions are, for the default 
> options, pretty close to Windows results.
> 
> Can you fill a bug report including a (as small as possible) 
> test case and the mono and libgdiplus version you are using ?
> 
> Thanks
> Sebastien
> >  
> > 
> > Thanks a lot for your help,
> > 
> >  
> > 
> > B.
> > 
> > 
> > _______________________________________________
> > Mono-list maillist  -  Mono-list at lists.ximian.com 
> > http://lists.ximian.com/mailman/listinfo/mono-list
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com 
> http://lists.ximian.com/mailman/listinfo/mono-list
> 


More information about the Mono-list mailing list