Dylan Smith : richedit: Corrected the conversion used for the initial font size.
Alexandre Julliard
julliard at winehq.org
Thu Jun 26 14:50:54 CDT 2008
Module: wine
Branch: master
Commit: 60757ca6d5ceb79a5599ca5be0c17225d9a86555
URL: http://source.winehq.org/git/wine.git/?a=commit;h=60757ca6d5ceb79a5599ca5be0c17225d9a86555
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
--- a/dlls/riched20/para.c
+++ b/dlls/riched20/para.c
@@ -52,7 +52,8 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor)
cf.dwEffects = CFE_AUTOCOLOR | CFE_AUTOBACKCOLOR;
lstrcpyW(cf.szFaceName, lf.lfFaceName);
- 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
mailing list