home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / os2 / programm / 3793 < prev    next >
Encoding:
Internet Message Format  |  1992-07-26  |  1.4 KB

  1. Path: sparky!uunet!ogicse!decwrl!netcomsv!mork!daveb
  2. From: daveb@netcom.com (Dave Briccetti)
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: Re: OUTLINE FONT METRICS
  5. Message-ID: <t2km8fn.daveb@netcom.com>
  6. Date: 26 Jul 92 18:12:10 GMT
  7. Article-I.D.: netcom.t2km8fn.daveb
  8. References: <ddesroch.711989648@mailseq>
  9. Organization: Netcom - Online Communication Services  (408 241-9760 guest)
  10. Lines: 25
  11.  
  12. ddesroch@oracle.uucp (David DesRoches) writes:
  13. : OK, so I've chosen this really cool OUTLINE font that I want to scale to say,
  14. : 32 points.  I compute the necessary character cell dimensions, call
  15. : GpiSetCharBox() and GpiSetCharSet() to select my new logical font.
  16. : QUESTION: How do I get the metrics for this font AT THE SELECTED POINT SIZE?
  17. : Calling GpiQueryFontMetrics() at this point returns the same metrics structure
  18. : I got back from my initial font query, with metrics designed around a 12 point
  19. : font or so.
  20. : My only current idea is to compute the ratio of logical.lMaxBaselineExt to
  21. : physical(base).lMaxBaselineExt and multiply the metrics by this ratio to
  22. : scale them (ascent, descent, maxwidth) to the point size I'm using.  This
  23. : seems bogus and prone to round-off error.
  24. : Am I missing something?
  25.  
  26. That's the approach I'm using.  If there is a better way, I'd like to 
  27. know about it too.
  28. -- 
  29.  
  30. Dave Briccetti, Owner, Dave Briccetti & Associates
  31. OS/2 Developer/Consultant
  32. P.O. Box 1713
  33. Lafayette, CA  94549-7013
  34.