Dylan Smith : richedit: Corrected the conversion used for the initial font size.
julliard at winehq.org
Thu Jun 26 14:50:54 CDT 2008
Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date: Wed Jun 25 11:40:39 2008 -0400
richedit: Corrected the conversion used for the initial font size.
The LOGFONT's lfHeight member is in logical units, and is being used to
set the yHeight member of CHARFORMAT2 which is supposed to be in twips.
dlls/riched20/para.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c
index d6a06d3..de69794 100644
@@ -52,7 +52,8 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor)
cf.dwEffects = CFE_AUTOCOLOR | CFE_AUTOBACKCOLOR;
- cf.yHeight = ME_twips2pointsY(&c, lf.lfHeight);
+ /* Convert system font height from logical units to twips for cf.yHeight */
+ cf.yHeight = (lf.lfHeight * 72 * 1440) / (c.dpi.cy * c.dpi.cy);
if (lf.lfWeight > FW_NORMAL) cf.dwEffects |= CFE_BOLD;
cf.wWeight = lf.lfWeight;
if (lf.lfItalic) cf.dwEffects |= CFE_ITALIC;
More information about the wine-cvs