From e1c630847c7fc5a02aa6d579985bc8f4a038fdb5 Mon Sep 17 00:00:00 2001 From: Byeong-Sik Jeon Date: Thu, 14 Sep 2006 21:10:19 +0900 Subject: [PATCH] comdlg32: Show better font style information in fontdlg. --- dlls/comdlg32/fontdlg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/comdlg32/fontdlg.c b/dlls/comdlg32/fontdlg.c index 4db8d224e32..9d4c27b4f93 100644 --- a/dlls/comdlg32/fontdlg.c +++ b/dlls/comdlg32/fontdlg.c @@ -386,13 +386,14 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTW *lplf) hf=SelectObject(hdc,hf); DeleteObject(hf); /* font successful created ? */ - if (tm.tmWeight==fontstyles[i].weight && + if (((fontstyles[i].weight == FW_NORMAL && tm.tmWeight <= FW_MEDIUM) || + (fontstyles[i].weight == FW_BOLD && tm.tmWeight > FW_MEDIUM)) && ((tm.tmItalic != 0)==fontstyles[i].italic)) { j=SendMessageW(hwnd,CB_ADDSTRING,0,(LPARAM)fontstyles[i].stname ); if (j==CB_ERR) return 1; j=SendMessageW(hwnd, CB_SETITEMDATA, j, - MAKELONG(fontstyles[i].weight,fontstyles[i].italic)); + MAKELONG(tm.tmWeight,fontstyles[i].italic)); if (j==CB_ERR) return 1; } }