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.

Posted on 2002-02-22 04:25:53 by KetilO
answer to your second question:
	call	GetUserDefaultLCID

lea ebx, dwBuffer
push ebx
push eax
call GetLocaleInfo
test eax, eax
je iprFail
the first part of the question is not clear to me...
Posted on 2002-02-22 06:12:09 by beaster
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.

Posted on 2002-02-22 06:38:25 by KetilO
windows gdi uses 72 as pt constant.

you can transform the values like this:
lfHeight = -MulDiv(PointSize, GetDeviceCaps(hDC, LOGPIXELSY), 72);
(found in sdk docu at LOGFONT)
Posted on 2002-02-22 08:23:12 by beaster
Thanks beaster

I will try it.

Posted on 2002-02-22 08:52:33 by 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.
Posted on 2002-02-22 10:22:15 by bitRAKE