[comp.windows.x] Vfont -> X Font converter wanted

mlandau@Diamond.BBN.COM (Matt Landau) (03/19/87)

When picking up the latest batch of fixes for Xv10r4 from prang.berkeley.edu,
I noticed that berkeley/newfonts contained some of the Sun fonts in X font
format.  I've been using these as my default fonts, and find them much more
readable than many of the distributed X fonts.  However, there are a few
other (local) vfont-format fonts that I'd like to get into X.  

Would whoever did the conversion on prang care to make the vfont -> X font 
conversion program they used available to the rest of us?

While we're on the subject of fonts, has anyone else noticed that the
helvetica fonts (helv10, helv10b) in Xv10r4 aren't really helvetica at
all, but look more like times-roman italics?  Anyone got some REAL 10
point helvetica fonts?
-- 
 Matt Landau      	 		BBN Laboratories, Inc.
    mlandau@diamond.bbn.com		10 Moulton Street, Cambridge MA 02238
 ...seismo!diamond.bbn.com!mlandau      (617) 497-2429

dcmartin@INGRES.BERKELEY.EDU ("David C. Martin") (03/20/87)

Public ftp to ingres.Berkeley.EDU in ~ftp/pub/X is vtoxfont.shar and
xtovfont.shar.  These programs run on a Sun and use the pixrect libraries to
make the X fonts (and vice versa).

There were some helvetica fonts posted to mod.sources a while back and probably
available off seismo.  There is also a converter program to make these into
vfont format.  The implication is obvious.  Check the sources index for the
appropriate volume.

dcm
-----
David C. Martin
-----
Computer Science Division
University of California
Berkeley, CA 94720
-----
arpa: dcmartin@ingres.Berkeley.EDU
uucp: {ihnp4,decvax}!ucbvax!dcmartin
at&t: 415/642-9585 (O)

gwu@vlsi.cs.cmu.edu (George Wu) (03/20/87)

     Someone has already writtem such a converter, though his name escapes me.
I think it was Ed Moy, but I won't swear to it. Anyways, whoever it is will
probably hear of this and reply.

						George

ken@rochester.ARPA (Ken Yap) (03/20/87)

A poorly documented feature in the Sun X server allows vfonts also to
be loaded. You put the font directory on XFONTPATH.

	Ken

dcmartin@INGRES.BERKELEY.EDU.UUCP (03/20/87)

Yes, I hacked that in too.

dcm
--------
Your message:

    A poorly documented feature in the Sun X server allows vfonts also to
    be loaded. You put the font directory on XFONTPATH.

    	Ken
--------

dcmartin@INGRES.BERKELEY.EDU.UUCP (03/20/87)

One more time....

I wrote it.  It is available by anonymous ftp to ingres.Berkeley.EDU in
pub/X/vtoxfont.shar.  There is also an xtovfont.shar to convert the other
way.

dcm
-----
David C. Martin
-----
arpa: dcmartin@ingres.Berkeley.EDU
uucp: {ihnp4,decvax}!ucbvax!dcmartin
at&t: 415/642-9585 (O)

jon@INTREPID.S1.GOV.UUCP (03/20/87)

   A poorly documented feature in the Sun X server allows vfonts also to
   be loaded. You put the font directory on XFONTPATH.

Or better yet, when making the server edit vssite.h to include your site's
vfont directories (/usr/lib/fonts/fixedwidthfonts over here), in
DEFAULT_FONT_PATH and forget about XFONTPATH (unless you make your
own fonts and keep them somewhere else).

		-- Jon

jon@INTREPID.S1.GOV.UUCP (03/21/87)

   Date: Fri 20 Mar 87 15:06:11-PST
   From: Richard Hodges <HODGES@sri-stripe.arpa>

   When I try to use vfonts, they do indeed work, but it seems necessary
   to rename them to have a suffix of .onx 
   Is this the way it should work?

Well, I don't think so.  It seems very silly to *always* append the
default suffix.  I think you should try looking for the name you get
as an argument, and if you can't find that then look for the name with
the default suffix tacked on.  The following is the relevant code I'm running
from font.c (I'm not sure if it was in the V10R4, I seem to have
slipped and forgot to RCS things, but it certainly wasn't in V10R3).

		-- Jon

static caddr_t
SearchXFontPath(fname)
register caddr_t	fname;
{
	register caddr_t	cp, pp, c2p;
	static char		xfontpath[MAXPATHLEN];

	/* check for an absolute pathname */
	if (*fname == '/') {
		if (access(fname, R_OK) == 0)
			return(fname);
		else
			return((caddr_t) NULL);
	}

	/* get the environment variable for XFONTPATH */
	if ((pp = getenv("XFONTPATH")) == (caddr_t) NULL) {
		pp = DEFAULT_FONT_PATH;
	}

	for (; *pp != '\0'; pp++) {
		for (cp = xfontpath; *pp != ':' && *pp != '\0'; *cp++ = *pp++);
		*cp++ = '/';
		for (c2p = fname; *c2p != '\0'; *cp++ = *c2p++);
		*cp = '\0';
		if (access(xfontpath, R_OK) == 0) {
			return(xfontpath);
		}
		for (c2p = DEFAULT_FONT_SUFFIX; *c2p != '\0'; *cp++ = *c2p++);
		*cp = '\0';
		if (access(xfontpath, R_OK) == 0) {
			return(xfontpath);
		}
	}
	return ((caddr_t) NULL);
} /* end SearchXFontPath() */