home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / windows / x / 15246 < prev    next >
Encoding:
Text File  |  1992-08-14  |  1.7 KB  |  59 lines

  1. Newsgroups: comp.windows.x
  2. Path: sparky!uunet!mcsun!sun4nl!dutrun!dutrun2!dutncp8!adri
  3. From: adri@dutncp8.tn.tudelft.nl (A.B. van Woerkom)
  4. Subject: Re: XFontStruct -> fontname
  5. Message-ID: <rlogin.713790289@dutncp8>
  6. Sender: news@dutrun2.tudelft.nl (UseNet News System)
  7. Nntp-Posting-Host: dutncp8.tn.tudelft.nl
  8. Organization: Delft University of Technology
  9. References: <1992Aug11.083841.18194@uni-paderborn.de>
  10. Date: Fri, 14 Aug 1992 11:04:49 GMT
  11. Lines: 46
  12.  
  13. poepping@uni-paderborn.de (Manfred Poepping) writes:
  14.  
  15.  
  16. >___________________________________________________
  17. >\                           \
  18. > \                                                  \ 
  19. >  \__________________________________________________\
  20. >  |                                                  |
  21. >\ |  How can I get the fontname from a XFontStruct ? |
  22. > \|__________________________________________________|
  23.  
  24.  
  25.  
  26. >  I have a XFontStruct - and I would like to know the
  27. >  fontname. Does anyone out there has any idea, how I 
  28. >  could get the needed information from the XFontStruct ?
  29.  
  30.  
  31. >  Thanks in advance
  32.  
  33. >  Manfred
  34.  
  35. You could try this:
  36.  
  37.     #include <X11/XAtom.h>
  38.     XFontStruct    *font_struct;
  39.     char        *name;
  40.  
  41.     if (XGetFontProperty( font_struct, XA_FONT_NAME, name))
  42.         /* name found */
  43.     else
  44.         /* no FONT_NAME property */
  45.  
  46. but the font properties are not guaranteed to be present on any server ...
  47.  
  48. Adri.
  49.  
  50.  
  51. --
  52. A.B. van Woerkom, adri@dutncp8.tn.tudelft.nl
  53. Delft University of Technology, Faculty of Applied Physics,
  54. Vakgroep Fysische Informatica, section Computational Physics,
  55. Lorentzweg 1, 2628 CJ  DELFT, The Netherlands
  56. ________________________________________________________________________
  57. "Unfortunately, the current generation of mail programs do not have checkers
  58.  to see if the sender knows what he is talking about" (A.S. Tanenbaum)
  59.