Commit c98f40e2 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdi32: Fix otmfsSelection to have bold style set in case of bold simulation.

parent 90eb2601
......@@ -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 oblique simulation */
/* 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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment