I have LOGFONT.lfHeight value-11 However, I know that the font size is actually 8 so I want to call this number Need to change into a different unit of measurement? I found this formula in MSDN docs:
int height = abs ((pixels * doti) / 72);
It takes the pixels and makes it a height value that LOGFONT uses. If I work it in another way:
int pixels = abs ((height / dotsi) * 72);
This gives me the value of 8.24. Do I need to convert font height to a useful value? > Yes DOTSY will be 96, which is the default monitor resolution in the DPI in Windows. I will need to make sure that this device is right for the device you are writing - the printer will usually have a lot of resolution, and the monitor resolution can change LfHeight To indicate that the font mapper should be used to use the character height instead of the cell height, it is only negative to indicate that Hn value here is important.
Comments
Post a Comment