home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / windows / x / 20865 < prev    next >
Encoding:
Text File  |  1993-01-07  |  1.1 KB  |  30 lines

  1. Newsgroups: comp.windows.x
  2. Path: sparky!uunet!gatech!darwin.sura.net!spool.mu.edu!enterpoop.mit.edu!bloom-beacon!INTERNET!dont-send-mail-to-path-lines
  3. From: mahan@TGV.COM (Patrick L. Mahan)
  4. Subject: RE: maximum string width
  5. Message-ID: <930107093311.20800431@code-z.tgv.com>
  6. Sender: root@athena.mit.edu (Wizard A. Root)
  7. Organization: The Internet
  8. Date: Thu, 7 Jan 1993 17:33:11 GMT
  9. Lines: 19
  10.  
  11. #
  12. #I am looking for creative ways to solve the following problem:
  13. #
  14. #I have a bunch of strings (~1500) and I want to figure out what the
  15. #width of the widest string is exactly.  Things to consider:
  16. #    1) It can be for any font (especially var. width).
  17. #    2) I *don't* want just the maximum char width for that font
  18. #       multiplied by the number of chars in the largest string.
  19. #
  20.  
  21. Use XTextWidth().  See your Xlib documentation for details.
  22.  
  23. Patrick L. Mahan
  24.  
  25. --- TGV Window Washer ------------------------------- Mahan@TGV.COM ---------
  26.  
  27. Waking a person unnecessarily should not be considered  - Lazarus Long
  28. a capital crime.  For a first offense, that is            From the Notebooks of
  29.                               Lazarus Long
  30.