[Mono-list] MeasureString

Jansen Bart bjansen at etro.vub.ac.be
Fri Sep 21 03:22:33 EDT 2007


Thanks all for commenting on this.
In my case TextRenderer.MeasureString seems to be working fine both on
win and lin, even without the NoPadding.

Regards,

B
-----Original Message-----
From: Steven Schulze [mailto:sschulze at vmware.com] 
Sent: donderdag 20 september 2007 23:24
To: sebastien.pouliot at gmail.com; Jansen Bart
Cc: mono-list at lists.ximian.com
Subject: RE: [Mono-list] MeasureString

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