home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / next / programm / 7282 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  1.1 KB

  1. Path: sparky!uunet!destroyer!gatech!prism!xray.gatech.edu!cc100aa
  2. From: cc100aa@xray.gatech.edu (Ray Spalding)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: Determining dimensions of text object
  5. Message-ID: <75311@hydra.gatech.EDU>
  6. Date: 18 Nov 92 19:26:42 GMT
  7. References: <1992Nov16.080646.2606@worg.questor.wimsey.bc.ca> <1992Nov18.144225.28136@csus.edu>
  8. Sender: news@prism.gatech.EDU
  9. Organization: Georgia Institute of Technology
  10. Lines: 13
  11.  
  12. In article <1992Nov16.080646.2606@worg.questor.wimsey.bc.ca>
  13.     david@worg.questor.org (David Lau) writes:
  14. >Suppose I want to make a text object big enough to hold m-by-n characters from
  15. >a fixed-width font, how do I go about determining its dimensions?
  16.  
  17. You can use NXTextFontInfo() to get the font's line height.
  18. You can use the getWidthOf: method of Font to get the width of
  19. any single, arbitrary character (they should all be the same
  20. in a fixed-width font).  Then, just multiply it out...
  21. -- 
  22. Ray Spalding, Office of Information Technology
  23. Georgia Institute of Technology, Atlanta Georgia, 30332-0715
  24. Internet: ray.spalding@oit.gatech.edu (NeXT Mail accepted)
  25.