Bugzilla – Bug 322320
Rendering problems
Last modified: 2008-05-05 14:16:27 UTC
---- Reported by jordimash@gmail.com 2006-10-07 09:53:41 MST ---- ---- Additional Comments From jordimash@gmail.com 2006-10-07 09:57:29 MST ---- swf-linklabels.exe sample at winforms/linklabel does not shows strings with multiple links correctly under win32. It works fine on Linux. ---- Additional Comments From jordimash@gmail.com 2006-10-07 09:59:12 MST ---- Created an attachment (id=170617) At the top you can see the sample with Microsoft .net and the bottom how it looks with Mono on Win32 ---- Additional Comments From toshok@ximian.com 2006-10-09 10:55:00 MST ---- I'm guessing this has something to do with a difference in behavior between our libgdi MeasureCharacterRanges and microsoft's, since it works fine on linux and .net but not mono on windows. ---- Additional Comments From sebastien@ximian.com 2006-10-10 09:29:35 MST ---- The output seems ok on linux as reported, however the sample app dies a few second after showing it's window. Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object at System.Windows.Forms.XplatUIX11.SendMessage (IntPtr hwnd, Msg message, IntPtr wParam, IntPtr lParam) [0x00007] in /home/poupou/svn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:4198 at System.Windows.Forms.XplatUIX11.GetMessage (System.Object queue_id, System.Windows.Forms.MSG& msg, IntPtr handle, Int32 wFilterMin, Int32 wFilterMax) [0x01052] in /home/poupou/svn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:3507 at System.Windows.Forms.XplatUI.GetMessage (System.Object queue_id, System.Windows.Forms.MSG& msg, IntPtr hWnd, Int32 wFilterMin, Int32 wFilterMax) [0x00000] in /home/poupou/svn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs:524 at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x002b2] in /home/poupou/svn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:543 at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [0x00000] in /home/poupou/svn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:421 at MyFormProject.MainForm.Main (System.String[] args) [0x00000] I'm updating to latest SVN to try again... ---- Additional Comments From sebastien@ximian.com 2006-10-10 10:57:14 MST ---- The NRE isn't present using "this morning" SVN. Using the "shouldn't be visible" focus rectangle it seems we display some "empty" space before the text. It looks like this is our missing space at the right end of the string (length is ok). For example look at the red-background label, the text should start much closer to the left than what we're displaying. There are a few other bugs visible when running the sample (besides the aft-mentioned focus). I have a fix for the label alignement (e.g. center, right). ---- Additional Comments From toshok@ximian.com 2006-10-10 14:04:22 MST ---- i've committed the alignment fix (using ClientRectangle instead of layout_rect.) going to look at MeasureCharacterRanges now. looks like it's not offseting the regions properly? ---- Additional Comments From toshok@ximian.com 2006-10-18 01:29:42 MST ---- looks like the only remaining problem as far as this bug goes is the word Mozilla in the last link in the UI. the entire word shows the link cursor, and clicking anywhere on it activates the link. But the focus rectangle shows the right placement/length.. so I'm thinking this is probably in the LinkLabel code. ---- Additional Comments From toshok@ximian.com 2006-10-30 22:38:15 MST ---- updated summary ---- Additional Comments From toshok@ximian.com 2006-10-30 22:38:33 MST ---- *** https://bugzilla.novell.com/show_bug.cgi?id=MONO79765 has been marked as a duplicate of this bug. *** ---- Additional Comments From toshok@ximian.com 2006-10-30 22:39:07 MST ---- https://bugzilla.novell.com/show_bug.cgi?id=MONO79765 has another testcase, this one just for the actual text layout, and not for the link pieces. ---- Additional Comments From toshok@ximian.com 2007-01-11 18:52:31 MST ---- *** https://bugzilla.novell.com/show_bug.cgi?id=MONO79765 has been marked as a duplicate of this bug. *** Imported an attachment (id=170617) Unknown operating system Windows XP (Cygwin). Setting to default OS "Other".
Created attachment 181105 [details] Screenshot
This looks fixed in SVN. Screenshot attached. Marking as Fixed.
Hey, it looks to be fixed because I already fixed it for Windows, but still have problem on X11, I will reopen and reassign again to me.
Oops, my bad. Can you please update the bug with what is still wrong? Thanks!
Hey :) Because we have different measure text results on our libgdiplus implementation, links don't works fine for X11. We must decide what to do, fix current backend or work in pango backend. Also we must check our libgdiplus priorities.
Created attachment 181276 [details] Screenshot of Linux issue
Confirmed, it is an libgdiplus measurement problem.
Tested again and in WinForms side everything is ok, that is why it works in Win32. In Libgdiplus the measurement functions dont take care about alignment. Changing component to libgdiplus and dependent on bug #324960.
*** This bug has been marked as a duplicate of bug 327039 ***