[comp.windows.ms.programmer] Printing under Windows

trig@dkatrig.ka.sub.org (Georg Trietsch) (11/21/90)

Hi There!

This is the first time I have to print out from a windows application.
At this time I'm able to get the fonts and sizes supported by the
printer using the EnumFont function. I found in Petzold's bible a way
to compute the point size with fields of the TEXTMETRIC struct, which
is:
     (tm.tmHeight - tm.tmInternalLeading + 10) / 20

Where mapmode is set to MM_TWIPS. Now I know that the default printer
is able to print several fonts in different sizes. I let the user
select font an size e.g. Lineprinter font in size of 8 Pt. How do I
compute the fields of the logical font struct to get 8 Pt..
Can anyone show me a short example how to select a printer font by name
an point size?

Thanks in advance.
Georg.

*********************************************************************
* -----   .    | UUCP  : trig@dkatrig.UUCP       |  Georg Trietsch  *
*  / /- /  /_> |         trig@dkatrig.ka.sub.org |  Karlsruhe  FRG  *
* / /  /   _/  | Voice : +49 721 406357          |                  *
*********************************************************************