Commit e8eb6d1b authored by Kirill K. Smirnov's avatar Kirill K. Smirnov Committed by Alexandre Julliard

winhlp32: Set correct font size while generating rtf stream.

parent 6e63953b
......@@ -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 */
......
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