Article View: comp.os.os2.programmer
Article #488Re: OUTLINE FONT METRICS
From: Michael Harris
Date: Sun, 26 Jul 1992 20:16
Date: Sun, 26 Jul 1992 20:16
24 lines
1725 bytes
1725 bytes
daveb@netcom.com (Dave Briccetti) writes:
>ddesroch@oracle.uucp (David DesRoches) writes:
>OK, so I've chosen this really cool OUTLINE font that I want to scale to say,
>32 points. I compute the necessary character cell dimensions, call
>GpiSetCharBox() and GpiSetCharSet() to select my new logical font.
>
>QUESTION: How do I get the metrics for this font AT THE SELECTED POINT SIZE?
>Calling GpiQueryFontMetrics() at this point returns the same metrics structure
>I got back from my initial font query, with metrics designed around a 12 point
>font or so.
>
>My only current idea is to compute the ratio of logical.lMaxBaselineExt to
>physical(base).lMaxBaselineExt and multiply the metrics by this ratio to
>scale them (ascent, descent, maxwidth) to the point size I'm using. This
>seems bogus and prone to round-off error.
>
>Am I missing something?
Alternatively, you could query *some* of the info via GpiQueryTextBox.
______________________________________________________________________________
Michael Harris - harris@catt.ncsu.edu or harris@carvm3.vnet.ibm.com
System Administrator, Computer & Technologies Theme Program, NC State Univ.
(My opinions are my own and do not represent those of NCSU or IBM Corporation)
Technical Details
Message-ID:
<harris.712181819@garfield.catt.ncsu.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!destroyer!gatech!taco!garfield.catt.ncsu.edu!harrisReferences:
<ddesroch.711989648@mailseq> <t2km8fn.daveb@netcom.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!destroyer!gatech!taco!garfield.catt.ncsu.edu!harris From: harris@garfield.catt.ncsu.edu (Michael Harris) Subject: Re: OUTLINE FONT METRICS Message-ID: <harris.712181819@garfield.catt.ncsu.edu> Sender: news@ncsu.edu (USENET News System) Organization: North Carolina State University References: <ddesroch.711989648@mailseq> <t2km8fn.daveb@netcom.com> Date: Sun, 26 Jul 1992 20:16:59 GMT Lines: 24