Module: wine Branch: master Commit: e8eb6d1b4227fa40391299ba3e5e806c575f6ba8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e8eb6d1b4227fa40391299ba3e...
Author: Kirill K. Smirnov lich@math.spbu.ru Date: Tue Aug 5 19:50:27 2008 +0400
winhlp32: Set correct font size while generating rtf stream.
---
programs/winhlp32/hlpfile.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/programs/winhlp32/hlpfile.c b/programs/winhlp32/hlpfile.c index 7f1a931..05d5347 100644 --- a/programs/winhlp32/hlpfile.c +++ b/programs/winhlp32/hlpfile.c @@ -1290,12 +1290,14 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd,
WINE_TRACE("Changing font to %d\n", font); format += 3; + /* Font size in hlpfile is given in the same units as + rtf control word \fs uses (half-points). */ switch (rd->font_scale) { - case 0: fs = (4 * page->file->fonts[font].LogFont.lfHeight - 13) / 5; break; + case 0: fs = page->file->fonts[font].LogFont.lfHeight - 4; break; default: - case 1: fs = (4 * page->file->fonts[font].LogFont.lfHeight - 3) / 5; break; - case 2: fs = (4 * page->file->fonts[font].LogFont.lfHeight + 17) / 5; break; + case 1: fs = page->file->fonts[font].LogFont.lfHeight; break; + case 2: fs = page->file->fonts[font].LogFont.lfHeight + 4; break; } /* FIXME: missing at least colors, also bold attribute looses information */