diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 43c27d13fdd..85ac5b2fa13 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -419,6 +419,7 @@ static void ME_RTFCharAttrHook(RTF_Info *info) fmt.szFaceName[sizeof(fmt.szFaceName)/sizeof(WCHAR)-1] = '\0'; fmt.bCharSet = f->rtfFCharSet; fmt.dwMask = CFM_FACE | CFM_CHARSET; + fmt.bPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE; } } break; diff --git a/dlls/riched20/run.c b/dlls/riched20/run.c index 5a3119d6bbe..2da891e7851 100644 --- a/dlls/riched20/run.c +++ b/dlls/riched20/run.c @@ -950,7 +950,8 @@ void ME_GetCharFormat(ME_TextEditor *editor, int nFrom, int nTo, CHARFORMAT2W *p { if (!(tmp.dwMask & CFM_FACE)) pFmt->dwMask &= ~CFM_FACE; - else if (lstrcmpW(pFmt->szFaceName, tmp.szFaceName)) + else if (lstrcmpW(pFmt->szFaceName, tmp.szFaceName) || + pFmt->bPitchAndFamily != tmp.bPitchAndFamily) pFmt->dwMask &= ~CFM_FACE; } if (pFmt->yHeight != tmp.yHeight) diff --git a/dlls/riched20/style.c b/dlls/riched20/style.c index 453c15b493f..ba7d6d321c7 100644 --- a/dlls/riched20/style.c +++ b/dlls/riched20/style.c @@ -320,7 +320,8 @@ ME_LogFontFromStyle(ME_Context* c, LOGFONTW *lf, const ME_Style *s) if (s->fmt.dwEffects & s->fmt.dwMask & (CFM_SUBSCRIPT|CFM_SUPERSCRIPT)) lf->lfHeight = (lf->lfHeight*2)/3; /*lf.lfQuality = PROOF_QUALITY; */ - lf->lfPitchAndFamily = s->fmt.bPitchAndFamily; + if (s->fmt.dwMask & CFM_FACE) + lf->lfPitchAndFamily = s->fmt.bPitchAndFamily; if (s->fmt.dwMask & CFM_CHARSET) lf->lfCharSet = s->fmt.bCharSet; }