home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!mcsun!sun4nl!dutrun!dutrun2!dutncp8!adri
- From: adri@dutncp8.tn.tudelft.nl (A.B. van Woerkom)
- Subject: Re: XFontStruct -> fontname
- Message-ID: <rlogin.713790289@dutncp8>
- Sender: news@dutrun2.tudelft.nl (UseNet News System)
- Nntp-Posting-Host: dutncp8.tn.tudelft.nl
- Organization: Delft University of Technology
- References: <1992Aug11.083841.18194@uni-paderborn.de>
- Date: Fri, 14 Aug 1992 11:04:49 GMT
- Lines: 46
-
- poepping@uni-paderborn.de (Manfred Poepping) writes:
-
-
- >___________________________________________________
- >\ \
- > \ \
- > \__________________________________________________\
- > | |
- >\ | How can I get the fontname from a XFontStruct ? |
- > \|__________________________________________________|
-
-
-
- > I have a XFontStruct - and I would like to know the
- > fontname. Does anyone out there has any idea, how I
- > could get the needed information from the XFontStruct ?
-
-
- > Thanks in advance
-
- > Manfred
-
- You could try this:
-
- #include <X11/XAtom.h>
- XFontStruct *font_struct;
- char *name;
-
- if (XGetFontProperty( font_struct, XA_FONT_NAME, name))
- /* name found */
- else
- /* no FONT_NAME property */
-
- but the font properties are not guaranteed to be present on any server ...
-
- Adri.
-
-
- --
- A.B. van Woerkom, adri@dutncp8.tn.tudelft.nl
- Delft University of Technology, Faculty of Applied Physics,
- Vakgroep Fysische Informatica, section Computational Physics,
- Lorentzweg 1, 2628 CJ DELFT, The Netherlands
- ________________________________________________________________________
- "Unfortunately, the current generation of mail programs do not have checkers
- to see if the sender knows what he is talking about" (A.S. Tanenbaum)
-