[Mono-bugs] [Bug 76664][Cri] New - bad charactersFitted in MeasureString

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Nov 10 10:05:12 EST 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by marcin at lexmedia.com.pl.

http://bugzilla.ximian.com/show_bug.cgi?id=76664

--- shadow/76664	2005-11-10 10:05:12.000000000 -0500
+++ shadow/76664.tmp.24173	2005-11-10 10:05:12.000000000 -0500
@@ -0,0 +1,68 @@
+Bug#: 76664
+Product: Mono: Class Libraries
+Version: 1.1
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Critical
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: marcin at lexmedia.com.pl               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: bad charactersFitted in MeasureString
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+
+Description of Problem:
+
+charactersFitted in function
+public SizeF MeasureString(
+   string text,
+   Font font,
+   SizeF layoutArea,
+   StringFormat stringFormat,
+   out int charactersFitted,
+   out int linesFilled
+);
+always return length of the string text, it should return charcters fitted
+in layoutArea (linesFilled is OK, SizeF.Width is OK)
+
+
+
+Steps to reproduce the problem:
+
+Graphics g = e.Graphics;
+int characters = 0,
+    lines = 0;
+SizeF sfSizeF = new SizeF();			
+String sText = "aaa aa aaaa a aaa";			
+			
+sfSizeF = g.MeasureString(
+             sText , 
+             new Font(new FontFamily (GenericFontFamilies.Serif), 11), 
+             new SizeF(80, 120), 
+             new StringFormat(), 
+             out characters, 
+             out lines);
+
+Actual Results:
+
+characters = sText.Length = 17
+
+
+Expected Results:
+
+characters = 12 (it depends on font)
+
+
+How often does this happen? 
+
+always
+
+Additional Information:


More information about the mono-bugs mailing list