Commit 2bcc1c07 authored by Walt Ogburn's avatar Walt Ogburn Committed by Alexandre Julliard

When applying logical / himetric ratio to olefont sizes, must divide

by the standard ratio 72 / 2540.
parent 187f7a4a
......@@ -953,7 +953,9 @@ static HRESULT WINAPI OLEFontImpl_get_hFont(
*/
IFont_get_Size(iface, &cySize);
fontHeight = MulDiv( cySize.s.Lo, this->cyLogical, this->cyHimetric );
/* Standard ratio is 72 / 2540, or 18 / 635 in lowest terms. */
/* Ratio is applied here relative to the standard. */
fontHeight = MulDiv( cySize.s.Lo, this->cyLogical*635, this->cyHimetric*18 );
memset(&logFont, 0, sizeof(LOGFONTW));
......@@ -1020,7 +1022,7 @@ static HRESULT WINAPI OLEFontImpl_Clone(
/* We need to clone the HFONT too. This is just cut & paste from above */
IFont_get_Size(iface, &cySize);
fontHeight = MulDiv(cySize.s.Lo, this->cyLogical,this->cyHimetric);
fontHeight = MulDiv(cySize.s.Lo, this->cyLogical*635,this->cyHimetric*18);
memset(&logFont, 0, sizeof(LOGFONTW));
......
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