diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 0ad55ea5c08..d472e0ffc77 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -336,7 +336,7 @@ static void ME_RTFCharAttrHook(RTF_Info *info) fmt.dwMask = CFM_BOLD | CFM_ITALIC | CFM_UNDERLINETYPE | CFM_STRIKEOUT | CFM_COLOR | CFM_BACKCOLOR | CFM_SIZE | CFM_WEIGHT; fmt.dwEffects = CFE_AUTOCOLOR | CFE_AUTOBACKCOLOR; fmt.yHeight = 12*20; /* 12pt */ - fmt.wWeight = 400; + fmt.wWeight = FW_NORMAL; fmt.bUnderlineType = CFU_UNDERLINENONE; break; case rtfBold: diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c index fcf2dcad969..4fb24e9259d 100644 --- a/dlls/riched20/para.c +++ b/dlls/riched20/para.c @@ -55,7 +55,7 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor) cf.dwEffects = CFE_AUTOCOLOR | CFE_AUTOBACKCOLOR; lstrcpyW(cf.szFaceName, lf.lfFaceName); cf.yHeight = ME_twips2pointsY(&c, lf.lfHeight); - if (lf.lfWeight >= 700) cf.dwEffects |= CFE_BOLD; + if (lf.lfWeight > FW_NORMAL) cf.dwEffects |= CFE_BOLD; cf.wWeight = lf.lfWeight; if (lf.lfItalic) cf.dwEffects |= CFE_ITALIC; cf.bUnderlineType = (lf.lfUnderline) ? CFU_CF1UNDERLINE : CFU_UNDERLINENONE; diff --git a/dlls/riched20/style.c b/dlls/riched20/style.c index 149e55678c8..43b2a96ad46 100644 --- a/dlls/riched20/style.c +++ b/dlls/riched20/style.c @@ -303,9 +303,9 @@ ME_LogFontFromStyle(ME_Context* c, LOGFONTW *lf, const ME_Style *s) lf->lfHeight = ME_twips2pointsY(c, -s->fmt.yHeight); - lf->lfWeight = 400; + lf->lfWeight = FW_NORMAL; if (s->fmt.dwEffects & s->fmt.dwMask & CFM_BOLD) - lf->lfWeight = 700; + lf->lfWeight = FW_BOLD; if (s->fmt.dwMask & CFM_WEIGHT) lf->lfWeight = s->fmt.wWeight; if (s->fmt.dwEffects & s->fmt.dwMask & CFM_ITALIC) @@ -337,7 +337,7 @@ void ME_CharFormatFromLogFont(HDC hDC, const LOGFONTW *lf, CHARFORMAT2W *fmt) fmt->dwMask = CFM_WEIGHT|CFM_BOLD|CFM_ITALIC|CFM_UNDERLINE|CFM_STRIKEOUT|CFM_SIZE|CFM_FACE|CFM_CHARSET; fmt->wWeight = lf->lfWeight; fmt->yHeight = -lf->lfHeight*1440/ry; - if (lf->lfWeight>400) fmt->dwEffects |= CFM_BOLD; + if (lf->lfWeight > FW_NORMAL) fmt->dwEffects |= CFM_BOLD; if (lf->lfItalic) fmt->dwEffects |= CFM_ITALIC; if (lf->lfUnderline) fmt->dwEffects |= CFM_UNDERLINE; /* notice that if a logfont was created with underline due to CFM_LINK, this