Eric Pouech : richedit: Uniformly handle the bPitchAndFamily field out of CHARFORMAT.
Alexandre Julliard
julliard at winehq.org
Mon Jan 7 08:39:05 CST 2008
Module: wine
Branch: master
Commit: d65daea45476791964afdb317a6e8e5a44709ca7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d65daea45476791964afdb317a6e8e5a44709ca7
Author: Eric Pouech <eric.pouech at orange.fr>
Date: Fri Jan 4 21:12:20 2008 +0100
richedit: Uniformly handle the bPitchAndFamily field out of CHARFORMAT.
---
dlls/riched20/editor.c | 1 +
dlls/riched20/run.c | 3 ++-
dlls/riched20/style.c | 3 ++-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 43c27d1..85ac5b2 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 5a3119d..2da891e 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 453c15b..ba7d6d3 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;
}
More information about the wine-cvs
mailing list