Eric Pouech : richedit: Correctly set the pitch and family for a font when reading an RTF stream.
Alexandre Julliard
julliard at winehq.org
Mon Mar 17 10:46:34 CDT 2008
Module: wine
Branch: master
Commit: 0c2c43d39b09680ad090609b212e278e50f804d0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0c2c43d39b09680ad090609b212e278e50f804d0
Author: Eric Pouech <eric.pouech at orange.fr>
Date: Sun Mar 16 21:47:25 2008 +0100
richedit: Correctly set the pitch and family for a font when reading an RTF stream.
---
dlls/riched20/editor.c | 2 +-
dlls/riched20/reader.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 7ad8980..dac289a 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -420,7 +420,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;
+ fmt.bPitchAndFamily = f->rtfFPitch | (f->rtfFFamily << 4);
}
}
break;
diff --git a/dlls/riched20/reader.c b/dlls/riched20/reader.c
index 28930db..4ed7258 100644
--- a/dlls/riched20/reader.c
+++ b/dlls/riched20/reader.c
@@ -857,9 +857,9 @@ static void ReadFontTbl(RTF_Info *info)
fp->rtfFName = NULL;
fp->rtfFAltName = NULL;
fp->rtfFNum = -1;
- fp->rtfFFamily = 0;
+ fp->rtfFFamily = FF_DONTCARE;
fp->rtfFCharSet = DEFAULT_CHARSET; /* 1 */
- fp->rtfFPitch = 0;
+ fp->rtfFPitch = DEFAULT_PITCH;
fp->rtfFType = 0;
fp->rtfFCodePage = CP_ACP;
More information about the wine-cvs
mailing list