https://bugzilla.novell.com/show_bug.cgi?id=737276
https://bugzilla.novell.com/show_bug.cgi?id=737276#c0 Summary: Mono-Winforms (v2.x) fails to render X11 bitmap (non-proportional) fonts Classification: Mono Product: Mono: Class Libraries Version: 2.10.x Platform: x86 OS/Version: Linux Status: NEW Severity: Normal Priority: P5 - None Component: Windows.Forms AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: Community User Blocker: Yes Description of Problem: I recently updated from Mono v1.9 (yes, I know, old horse...) to v2.10.6 and found out that all the Mono-Winforms based programs suddenly broke at the UI level (while Mono-GTK ones keep working like a charm). I managed to pinpoint the problem and found out it was related to the font that was configured as the preferred/default font in my system: when this font is a bitmap (non-proportional) font such as the lovely Adobe Helvetica (Xorg 75dpi font), Winforms fails lamentably to render it, while it got no problem with proportional fonts (all the ugly Utopia, Liberation, URW, etc)... Steps to reproduce the problem: 1. Make sure you got the 75dpi or 100dpi Xorg Adobe fonts installed (Adobe Helvetica, Times New Roman, Courier) 1. Make sure your system is not configured to replace bitmap fonts with proportional ones (Mandriva does that, replacing Adobe's with Liberation fonts, for example. In Mandriva, just remove the /etc/fonts/conf.d/26-mdv-no-embeddedbitmap.conf, /etc/fonts/conf.d/30-mdv-avoid-bitmap.conf and /etc/fonts/conf.d/30-mdv-urwfonts.conf files). 2. Edit your /etc/fonts/conf.d/60-latin.conf to list Helvetica as the preferred sans-serif font, for example: <alias> <family>sans-serif</family> <prefer> <family>Helvetica</family> <family>DejaVu Sans</family> <family>Helvetica</family> <family>Bitstream Vera Sans</family> <family>Luxi Sans</family> <family>Nimbus Sans L</family> <family>Arial</family> <family>Albany AMT</family> <family>Verdana</family> <family>Lucida Sans Unicode</family> </prefer> </alias> 3. Run any Mono-Winforms program and observe the disaster ! Actual Results: Here are two screenshots for one of the Mono-Winforms program I use (Radegast: http://radegast.org/wp/) This one shows the correct UI: http://sldev.free.fr/pictures/Capture-Radegast-Good-UI.png This one shows the broken UI, with collapsed input and combo boxes: http://sldev.free.fr/pictures/Capture-Radegast-Bad-UI.png When running the program, I receive many such errors: ---------- X11 Error encountered: Error: BadGC (invalid GC parameter) Request: 60 (0) Resource ID: 0x3C0004E Serial: 3247 Hwnd: Hwnd, Mapped:True ClientWindow:0x3C0004E, WholeWindow:0x3C0004D, Zombie=False, Parent:[Hwnd, Mapped:True ClientWindow:0x3C0004C, WholeWindow:0x3C0004B, Zombie=False, Parent:[Hwnd, Mapped:True ClientWindow:0x3C0003D, WholeWindow:0x3C0003C, Zombie=False, Parent:[Hwnd, Mapped:True ClientWindow:0x3C00039, WholeWindow:0x3C00038, Zombie=False, Parent:[Hwnd, Mapped:True ClientWindow:0x3C00035, WholeWindow:0x3C00034, Zombie=False, Parent:[Hwnd, Mapped:True ClientWindow:0x3C0001D, WholeWindow:0x3C0001C, Zombie=False, Parent:[Hwnd, Mapped:True ClientWindow:0x3C0001B, WholeWindow:0x3C0001A, Zombie=False, Parent:[Hwnd, Mapped:True ClientWindow:0x3C00019, WholeWindow:0x3C00018, Zombie=False, Parent:[Hwnd, Mapped:True ClientWindow:0x3C00017, WholeWindow:0x3C00016, Zombie=False, Parent:[Hwnd, Mapped:True ClientWindow:0x3C00015, WholeWindow:0x3C00014, Zombie=False, Parent:[Hwnd, Mapped:True ClientWindow:0x3C00013, WholeWindow:0x3C00012, Zombie=False, Parent:[<null>]]]]]]]]]]] Control: System.Windows.Forms.ComboBox+ComboTextBox, Text: Rune Mills at System.Environment.get_StackTrace() at System.Windows.Forms.XplatUIX11.HandleError(IntPtr display, XErrorEvent ByRef error_event) at System.Drawing.GDIPlus.GdipCreateFromXDrawable_linux(IntPtr , IntPtr , IntPtr ByRef ) at System.Drawing.Graphics.FromXDrawable(IntPtr drawable, IntPtr display) at System.Drawing.Graphics.FromHwnd(IntPtr hwnd) at System.Windows.Forms.XplatUIX11.PaintEventStart(Message ByRef msg, IntPtr handle, Boolean client) at System.Windows.Forms.XplatUI.PaintEventStart(Message ByRef msg, IntPtr handle, Boolean client) at System.Windows.Forms.Control.WmPaint(Message ByRef m) at System.Windows.Forms.Control.WndProc(Message ByRef m) at System.Windows.Forms.ButtonBase.WndProc(Message ByRef m) at System.Windows.Forms.Button.WndProc(Message ByRef m) at System.Windows.Forms.Control+ControlWindowTarget.OnMessage(Message ByRef m) at System.Windows.Forms.Control+ControlNativeWindow.WndProc(Message ByRef m) at System.Windows.Forms.NativeWindow.WndProc(IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) at System.Windows.Forms.XplatUIX11.DispatchMessage(MSG ByRef msg) at System.Windows.Forms.XplatUI.DispatchMessage(MSG ByRef msg) at System.Windows.Forms.Application.RunLoop(Boolean Modal, System.Windows.Forms.ApplicationContext context) at System.Windows.Forms.Application.Run(System.Windows.Forms.ApplicationContext context) at System.Windows.Forms.Application.Run(System.Windows.Forms.Form mainForm) at Radegast.MainProgram.RunRadegast(System.String[] args) at Radegast.MainProgram.Main(System.String[] args) ---------- Expected Results: That bitmap/non-proportional fonts would render properly like they always did in Mono v1.x... How often does this happen? Always. Additional Information: Note that this problem occurs with all the Mono v2 versions I tested (v2.2, v2.4, v2.6, v2.10) but never with any v1 version... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
