winedbg: Use standard fixed pitch UI font for the crash dialog.

Dmitry Timoshkov dmitry at baikal.ru
Wed Aug 15 20:54:18 CDT 2012


Dmitry Timoshkov <dmitry at baikal.ru> wrote:

>  static void set_fixed_font( HWND dlg, UINT id )
>  {
> -    HFONT hfont = (HFONT)SendDlgItemMessageW( dlg, id, WM_GETFONT, 0, 0);
> -    LOGFONTW font;
> +    HFONT hfont;
>  
> -    GetObjectW(hfont, sizeof(LOGFONTW), &font);
> -    font.lfPitchAndFamily = FIXED_PITCH;
> -    font.lfFaceName[0] = 0;
> -    hfont = CreateFontIndirectW(&font);
> +    hfont = GetStockObject( ANSI_FIXED_FONT );
>      SendDlgItemMessageW( dlg, id, WM_SETFONT, (WPARAM)hfont, TRUE );
>  }

To clarify things a bit: current code uses empty font face name, and GDI
uses "System" font in that case (regardless of requested FIXED_PITCH), which
is absolutely not readable. ANSI_FIXED_FONT should use built-in "Courier",
which is actually a FIXED_PITCH font and much more readable.

-- 
Dmitry.



More information about the wine-devel mailing list