1 Mar 2001 09:47
Re: misunderstanding CFont
Hi Brandon, > I don't know where this "10 decipoints/point" is coming in. See CFont::CreatePointFontIndirect() from MFC. MSDN say: "This function is the same as CreateFontIndirect except that the lfHeight member of the LOGFONT is interpreted in tenths of a point rather than device units." Yuri. ----- Original message ----- From: "Brandon Corfman" <bcorfman@...> To: <wtl@...> Sent: 28 February 2001, 14:50 Subject: [wtl] misunderstanding CFont > CreatePointFontIndirect uses the following calculation to convert the > user-supplied point height: > > pt.y = ::GetDeviceCaps(hDC1, LOGPIXELSY) * logFont.lfHeight; > pt.y /= 720; // 72 points/inch, 10 decipoints/point > > It seems, however, that the last statement should contain a 72, not > 720. (The calculation works correctly if I make it 72.) I don't know > where this "10 decipoints/point" is coming in. I'm assuming mapping > mode MM_TEXT. Is this calculation assuming another type? What am I > missing? > > Thanks,(Continue reading)
RSS Feed