Re: winedbg: Use standard fixed pitch UI font for the crash dialog.
Dmitry Timoshkov <dmitry(a)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.
Dmitry Timoshkov <dmitry(a)baikal.ru> writes:
Dmitry Timoshkov <dmitry(a)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.
For me every tab is replaced by a black square, so it doesn't look all that good... -- Alexandre Julliard julliard(a)winehq.org
Alexandre Julliard <julliard(a)winehq.org> wrote:
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.
For me every tab is replaced by a black square, so it doesn't look all that good...
That's a not related problem. If that's all that prevents this patch from being accepted I could have a look at the font bitmaps and fix it. -- Dmitry.
Alexandre Julliard <julliard(a)winehq.org> wrote:
For me every tab is replaced by a black square, so it doesn't look all that good...
Actually that's a bug in edit control (or rather a bug in new fancy edit implementation using uniscribe): running notepad, then changing font to Courier and pressing tab draws same black square. -- Dmitry.
participants (2)
-
Alexandre Julliard -
Dmitry Timoshkov