gdi32: Fix otmfsSelection to have bold style set in case of bold simulation.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
90eb26015e
commit
c98f40e227
|
@ -7850,6 +7850,8 @@ static BOOL get_outline_text_metrics(GdiFont *font)
|
|||
font->potm->otmfsSelection = pOS2->fsSelection;
|
||||
if (font->fake_italic)
|
||||
font->potm->otmfsSelection |= 1;
|
||||
if (font->fake_bold)
|
||||
font->potm->otmfsSelection |= 1 << 5;
|
||||
font->potm->otmfsType = pOS2->fsType;
|
||||
font->potm->otmsCharSlopeRise = pHori->caret_Slope_Rise;
|
||||
font->potm->otmsCharSlopeRun = pHori->caret_Slope_Run;
|
||||
|
|
|
@ -2144,9 +2144,22 @@ static void test_GetOutlineTextMetrics(void)
|
|||
LPSTR unset_ptr;
|
||||
UINT fsSelection;
|
||||
|
||||
/* check fsSelection field with bold simulation */
|
||||
memset(&lf, 0, sizeof(lf));
|
||||
strcpy(lf.lfFaceName, "Wingdings");
|
||||
lf.lfCharSet = SYMBOL_CHARSET;
|
||||
|
||||
/* regular face */
|
||||
fsSelection = get_font_fsselection(&lf);
|
||||
ok((fsSelection & (1 << 5)) == 0, "got 0x%x\n", fsSelection);
|
||||
|
||||
/* face with bold simulation */
|
||||
lf.lfWeight = FW_BOLD;
|
||||
fsSelection = get_font_fsselection(&lf);
|
||||
ok((fsSelection & (1 << 5)) != 0, "got 0x%x\n", fsSelection);
|
||||
|
||||
/* check fsSelection field with oblique simulation */
|
||||
memset(&lf, 0, sizeof(lf));
|
||||
|
||||
strcpy(lf.lfFaceName, "Tahoma");
|
||||
lf.lfHeight = -13;
|
||||
lf.lfWeight = FW_NORMAL;
|
||||
|
|
Loading…
Reference in New Issue