Hi all
I am creating a pritout using DrawText. Converting a 10pt size font to what I think is right is easy, but does there exist a standard factor. And at the same time. How do I detect if the os is set to use inches / mm.
KetilO
I am creating a pritout using DrawText. Converting a 10pt size font to what I think is right is easy, but does there exist a standard factor. And at the same time. How do I detect if the os is set to use inches / mm.
KetilO
answer to your second question:
call GetUserDefaultLCID
lea ebx, dwBuffer
push DWORDSIZE
push ebx
push LOCALE_IMEASURE
push eax
call GetLocaleInfo
test eax, eax
je iprFail
the first part of the question is not clear to me...Thanks beaster
When you select a font you select the size in vertical points eg. 10pt.
When you want to print something you need characters pr. inch (cpi) because some printers has 300 dots pr. inch (dpi) and others 600 dpi. What I need is to know if there exist a standard method to convert from pt to cpi. I could find the factor by trial but there must be a standard factor.
KetilO
When you select a font you select the size in vertical points eg. 10pt.
When you want to print something you need characters pr. inch (cpi) because some printers has 300 dots pr. inch (dpi) and others 600 dpi. What I need is to know if there exist a standard method to convert from pt to cpi. I could find the factor by trial but there must be a standard factor.
KetilO
windows gdi uses 72 as pt constant.
you can transform the values like this:
you can transform the values like this:
lfHeight = -MulDiv(PointSize, GetDeviceCaps(hDC, LOGPIXELSY), 72);
(found in sdk docu at LOGFONT)Thanks beaster
I will try it.
KetilO
I will try it.
KetilO
72 points = 1 inch
I believe it is a typesetting standard. When I worked on the school paper, we used the conversion to layout a page - we used an old printing press - not computers.
I believe it is a typesetting standard. When I worked on the school paper, we used the conversion to layout a page - we used an old printing press - not computers.