[Mono-bugs] [Bug 737276] New: Mono-Winforms (v2.x) fails to render X11 bitmap (non-proportional) fonts

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Dec 16 04:32:40 EST 2011



           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: mono-bugs at lists.ximian.com
        ReportedBy: sldev at hotmail.com
         QAContact: mono-bugs at lists.ximian.com
          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/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:
            <family>DejaVu Sans</family>
            <family>Bitstream Vera Sans</family>
            <family>Luxi Sans</family>
            <family>Nimbus Sans L</family>
            <family>Albany AMT</family>
            <family>Lucida Sans Unicode</family>
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:
This one shows the broken UI, with collapsed input and combo boxes:

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,
Control: System.Windows.Forms.ComboBox+ComboTextBox, Text: Rune Mills at
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
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? 


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.

More information about the mono-bugs mailing list