Article View: comp.os.ms-windows.programmer.misc
Article #2623Re: Printing. How to make 11 pt come out...
From: Chris Marriott
Date: Fri, 08 Jan 1993 19:38
Date: Fri, 08 Jan 1993 19:38
31 lines
1726 bytes
1726 bytes
In article <1993Jan8.144922.3697@cis.ohio-state.edu> guzman@python.cis.ohio-state.edu writes:
>....looking like 11 pt regardless of the device onto which you are rendering
> the
>text?? I have a program that uses TT fonts for output (due to their scalabi-
>lity), but I am having to *manually* adjust the font size -when I CreateFont
>for the DC- depending on the output device (screen, printer).
>
>I am obviously missing something here. What??
>
>Thanks all
> Jon -- guzman@cis.ohio-state.edu
>
If you have a device context handle, hDC, you can get 11-point text by
saying:
nHeight = 11*GetDeviceCaps( hDC, LOGPIXELSY )/72;
then creating a font that's "nHeight" pixels high. That's the standard
method.
Chris
--
--------------------------------------------------------------------------
| Chris Marriott | chris@chrism.demon.co.uk |
| Warrington, UK | BIX: cmarriott |
| (Still awaiting inspiration | CIX: cmarriott |
| for a witty .sig .... ) | CompuServe: 100113,1140 |
--------------------------------------------------------------------------
Technical Details
Message-ID:
<726521916snz@chrism.demon.co.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!pipex!demon!chrism.demon.co.uk!chrisReferences:
<1993Jan8.144922.3697@cis.ohio-state.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc From: chris@chrism.demon.co.uk (Chris Marriott) Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!demon!chrism.demon.co.uk!chris Subject: Re: Printing. How to make 11 pt come out... Distribution: world References: <1993Jan8.144922.3697@cis.ohio-state.edu> Organization: None Reply-To: chris@chrism.demon.co.uk X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19) Lines: 31 Date: Fri, 8 Jan 1993 19:38:36 +0000 Message-ID: <726521916snz@chrism.demon.co.uk> Sender: usenet@demon.co.uk