mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
Fix a bug in the test for italic font style property.
This commit is contained in:
parent
3e22f4320f
commit
c9197aad4f
1 changed files with 4 additions and 4 deletions
|
@ -444,8 +444,8 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTA *lplf)
|
|||
char stname[20];
|
||||
};
|
||||
static struct FONTSTYLE fontstyles[FSTYLES]={
|
||||
{ 0,FW_NORMAL,"Regular"},{0,FW_BOLD,"Bold"},
|
||||
{ 1,FW_NORMAL,"Italic"}, {1,FW_BOLD,"Bold Italic"}
|
||||
{ 0,FW_NORMAL,"Regular"}, { 1,FW_NORMAL,"Italic"},
|
||||
{ 0,FW_BOLD,"Bold"}, { 1,FW_BOLD,"Bold Italic"}
|
||||
};
|
||||
HFONT hf;
|
||||
TEXTMETRICA tm;
|
||||
|
@ -463,9 +463,9 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTA *lplf)
|
|||
GetTextMetricsA(hdc,&tm);
|
||||
hf=SelectObject(hdc,hf);
|
||||
DeleteObject(hf);
|
||||
|
||||
/* font successful created ? */
|
||||
if (tm.tmWeight==fontstyles[i].weight &&
|
||||
tm.tmItalic==fontstyles[i].italic) /* font successful created ? */
|
||||
((tm.tmItalic != 0)==fontstyles[i].italic))
|
||||
{
|
||||
j=SendMessageA(hwnd,CB_ADDSTRING,0,(LPARAM)fontstyles[i].stname );
|
||||
if (j==CB_ERR) return 1;
|
||||
|
|
Loading…
Reference in a new issue