Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!INTREPID.S1.GOV!jon From: jon@INTREPID.S1.GOV.UUCP Newsgroups: comp.windows.x Subject: Vfont -> X Font converter wanted Message-ID: <8703210006.AA05263@corwin.s1.gov> Date: Fri, 20-Mar-87 19:06:00 EST Article-I.D.: corwin.8703210006.AA05263 Posted: Fri Mar 20 19:06:00 1987 Date-Received: Sun, 22-Mar-87 23:43:44 EST References: <12287990202.21.HODGES@SRI-STRIPE.ARPA> Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 53 Date: Fri 20 Mar 87 15:06:11-PST From: Richard Hodges 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() */