From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX"  4-MAR-1991 08:32:50.45
To:	ARISIA::EVERHART
CC:	
Subj:	Re: DECwindows question.

From:	RELAY-INFO-VAX@CRVAX.SRI.COM@SMTP@CRDGW2
To:	Everhart@Arisia@MRGATE

Received:  by crdgw1.ge.com (5.57/GE 1.88)
	 id AA13098; Mon, 4 Mar 91 07:38:44 EST
Received: From UCBVAX.BERKELEY.EDU by CRVAX.SRI.COM with TCP; Sat,  2 MAR 91 15:17:50 PST
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA05671; Sat, 2 Mar 91 15:16:06 -0800
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 2 Mar 91 07:55:24 GMT
From: sdd.hp.com!elroy.jpl.nasa.gov!jarthur!nntp-server.caltech.edu!eql7.caltech.edu!rankin@ucsd.edu  (Pat Rankin)
Organization: Environmental Quality Laboratory, Caltech
Subject: Re: DECwindows question.
Message-Id: <1991Mar2.080235.5483@nntp-server.caltech.edu>
References: <B2CD7656015F201450@moose.cccs.umn.edu>, <1991Feb28.211417.20543@news.arc.nasa.gov>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

In newsgroup comp.os.vms, article <1991Feb28.211417.20543@news.arc.nasa.gov>,\
 mcmahon@tgv.com (John 'Fast-Eddie' McMahon) writes...
>In article <B2CD7656015F201450@moose.cccs.umn.edu>,\
  RAO@MOOSE.CCCS.UMN.EDU ("Rao V. Akella") writes:
>#[ Unix client <-> VMS DECwindows server font question(s) ]
..
>#How do I find out what fonts DECwindows _does_ have?
> 
> Use XLSFONTS from any MIT X11 Kit (on your Sun) or from the DECUS X Tape.

     If you want something quick and dirty to run directly on your
VAXstation, this is derived from the 'listfonts' program in the UisX
distribution for VWS 4.3.  I've fixed a couple bugs, perhaps substituting
some of my own. ;-)

		Pat Rankin, rankin@eql.caltech.edu
-----
/* list all the fonts on an X11 Server, including DECwindows VAXstation */
#include <stdio>
#define EXIT_SUCCESS 1
#include <X11/Xlib.h>           /* ``$ define X11 decw$include:'' */
#include <X11/Xutil.h>          /*( link with sys$share:decw$xlibshr )*/
#define MATCH_LIMIT 1024        /* maximum number of fonts to list */

main ( int argc, char *argv[] )
{
    char    **path_ptr, **font_ptr;
    int     path_count, match_count;
    register int i;
    char    *pattern = ( argc > 1 ? argv[1] : "*" );  /* default is 'all' */
    Display *dpy = XOpenDisplay("");  /* use "decw$display:" to find server */

    path_ptr = XGetFontPath(dpy, &path_count);
    printf("Font path%s...\n", path_count > 1 ? "s" : "");
    for (i = 0; i < path_count; i++)  puts(path_ptr[i]);
    XFreeFontPath(path_ptr);

    font_ptr = XListFonts(dpy, pattern, MATCH_LIMIT, &match_count);
    printf("%d fonts...\n", match_count);
    for (i = 0; i < match_count; i++)  puts(font_ptr[i]);
    XFreeFontNames(font_ptr);

    return EXIT_SUCCESS;
}
-----

