Is there a windows API function
that returns font size in pixels?
It seems to me that this should be easy
because the mapper needs this info to
draw the font.
If not how do I convert logical units to pixels and
get all the needed info to do that?
For example what function do I use to get dpi,
points per inch,font size in points?
Thanks.
Comments
[link=http://msdn.microsoft.com/en-us/library/dd144938(VS.85).aspx]http://msdn.microsoft.com/en-us/library/dd144938(VS.85).aspx[/link]
By default logical units are pixels. If not, then use this API:
[link=http://msdn.microsoft.com/en-us/library/dd145042(VS.85).aspx]http://msdn.microsoft.com/en-us/library/dd145042(VS.85).aspx[/link]
[/color]
The mapping mode must be set to
MM_TEXT and then logical units are
pixels.
For setting this I use the API
function SetMapMode().
LPtoDP function I will maybe use elsewhere.