Commit 0c2c43d3 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

richedit: Correctly set the pitch and family for a font when reading an RTF stream.

parent a86d7bdc
...@@ -420,7 +420,7 @@ static void ME_RTFCharAttrHook(RTF_Info *info) ...@@ -420,7 +420,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; fmt.bPitchAndFamily = f->rtfFPitch | (f->rtfFFamily << 4);
} }
} }
break; break;
......
...@@ -857,9 +857,9 @@ static void ReadFontTbl(RTF_Info *info) ...@@ -857,9 +857,9 @@ static void ReadFontTbl(RTF_Info *info)
fp->rtfFName = NULL; fp->rtfFName = NULL;
fp->rtfFAltName = NULL; fp->rtfFAltName = NULL;
fp->rtfFNum = -1; fp->rtfFNum = -1;
fp->rtfFFamily = 0; fp->rtfFFamily = FF_DONTCARE;
fp->rtfFCharSet = DEFAULT_CHARSET; /* 1 */ fp->rtfFCharSet = DEFAULT_CHARSET; /* 1 */
fp->rtfFPitch = 0; fp->rtfFPitch = DEFAULT_PITCH;
fp->rtfFType = 0; fp->rtfFType = 0;
fp->rtfFCodePage = CP_ACP; fp->rtfFCodePage = CP_ACP;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment