richedit: Enforce the maximum font size.

Trying to set the font size to a value larger than 1638
in points (yHeightCharPtsMost) using EM_SETCHARFORMAT will cause it to be
set to actually set to the maximum.
This commit is contained in:
Dylan Smith 2008-07-11 20:05:57 -04:00 committed by Alexandre Julliard
parent 88c25518d5
commit 43ad427a15
1 changed files with 4 additions and 1 deletions

View File

@ -197,7 +197,10 @@ ME_Style *ME_ApplyStyle(ME_Style *sSrc, CHARFORMAT2W *style)
COPY_STYLE_ITEM(CFM_LCID, lcid);
COPY_STYLE_ITEM(CFM_OFFSET, yOffset);
COPY_STYLE_ITEM(CFM_REVAUTHOR, bRevAuthor);
COPY_STYLE_ITEM(CFM_SIZE, yHeight);
if (style->dwMask & CFM_SIZE) {
s->fmt.dwMask |= CFM_SIZE;
s->fmt.yHeight = min(style->yHeight, yHeightCharPtsMost * 20);
}
COPY_STYLE_ITEM(CFM_SPACING, sSpacing);
COPY_STYLE_ITEM(CFM_STYLE, sStyle);
COPY_STYLE_ITEM(CFM_UNDERLINETYPE, bUnderlineType);