richedit: Uniformly handle the bPitchAndFamily field out of CHARFORMAT.
This commit is contained in:
parent
cb4f8a80de
commit
d65daea454
|
@ -419,6 +419,7 @@ static void ME_RTFCharAttrHook(RTF_Info *info)
|
||||||
fmt.szFaceName[sizeof(fmt.szFaceName)/sizeof(WCHAR)-1] = '\0';
|
fmt.szFaceName[sizeof(fmt.szFaceName)/sizeof(WCHAR)-1] = '\0';
|
||||||
fmt.bCharSet = f->rtfFCharSet;
|
fmt.bCharSet = f->rtfFCharSet;
|
||||||
fmt.dwMask = CFM_FACE | CFM_CHARSET;
|
fmt.dwMask = CFM_FACE | CFM_CHARSET;
|
||||||
|
fmt.bPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -950,7 +950,8 @@ void ME_GetCharFormat(ME_TextEditor *editor, int nFrom, int nTo, CHARFORMAT2W *p
|
||||||
{
|
{
|
||||||
if (!(tmp.dwMask & CFM_FACE))
|
if (!(tmp.dwMask & CFM_FACE))
|
||||||
pFmt->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;
|
pFmt->dwMask &= ~CFM_FACE;
|
||||||
}
|
}
|
||||||
if (pFmt->yHeight != tmp.yHeight)
|
if (pFmt->yHeight != tmp.yHeight)
|
||||||
|
|
|
@ -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))
|
if (s->fmt.dwEffects & s->fmt.dwMask & (CFM_SUBSCRIPT|CFM_SUPERSCRIPT))
|
||||||
lf->lfHeight = (lf->lfHeight*2)/3;
|
lf->lfHeight = (lf->lfHeight*2)/3;
|
||||||
/*lf.lfQuality = PROOF_QUALITY; */
|
/*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)
|
if (s->fmt.dwMask & CFM_CHARSET)
|
||||||
lf->lfCharSet = s->fmt.bCharSet;
|
lf->lfCharSet = s->fmt.bCharSet;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue