Commit 43ad427a authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

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.
parent 88c25518
......@@ -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);
......
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