casey@lll-crg.llnl.gov (Casey Leedom) (01/13/89)
I hope someone unifies fonts for all these applications some days and standardizes thier structure. I have at least seven different font sets on my system now. None of them compatible with any of the others. All of them sucking up megabytes. Xdvi's particular problem is with TeX which apparently doesn't have it's fonts in the same directory structure from installation to installation. We're using Arbor TeX on our Suns which is pretty good all in all, but you really have to pamper xdvi to get it to find the fonts. I'll include the little diff to path_open we're using, but I can't recommend it in general. Xdvi is also full of non-robust code. I'm constantly amazed that it doesn't core dump with segementation faults. *** clients/xdvi/path_open.c-dist Thu Jul 28 08:47:04 1988 --- clients/xdvi/path_open.c Thu Dec 22 04:37:48 1988 *************** *** 109,114 **** --- 109,117 ---- * eichin@athena.mit.edu) */ dotsplit = rindex(tname, '.'); + while (--dotsplit >= tname && *dotsplit >= '0' && *dotsplit <= '9') + continue; + dotsplit++; *dotsplit++ = '/'; *dotsplit = '\0'; strcat(tname, name); #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create: # clients/xdvi/Imakefile # clients/xdvi/xdvi.man.sed # This archive created: Thu Jan 12 19:33:49 1989 export PATH; PATH=/bin:/usr/bin:$PATH if test -f 'clients/xdvi/Imakefile' then echo shar: "will not over-write existing file 'clients/xdvi/Imakefile'" else sed 's/^X//' << \SHAR_EOF > 'clients/xdvi/Imakefile' X FONTPATH = TEXFONTS XDEFAULT_FONT_PATH = /usr/local/tex/pixels/screen X X INCLUDES = -I$(TOP) -I$(TOP)/X11 X DEFINES = -DFONTPATH=\"$(FONTPATH)\" \ X -DDEFAULT_FONT_PATH=\"$(DEFAULT_FONT_PATH)\" X LOCAL_LIBRARIES = $(XLIB) X SYS_LIBRARIES = -lm X SRCS = xdvi.c table.c path_open.c X OBJS = xdvi.o table.o path_open.o X XComplexProgramTarget(xdvi) X Xtable.c: mktable X mktable > table.c X Xmktable: mktable.c X $(CC) $(CFLAGS) -o mktable mktable.c X Xxdvi.man: X sed -e "s;%%FONTPATH%%;$(FONTPATH);g" \ X -e "s;%%DEFAULT_FONT_PATH%%;$(DEFAULT_FONT_PATH);g" \ X < xdvi.man.sed \ X > xdvi.man X Xclean:: X rm -f mktable table.c xdvi.man SHAR_EOF fi if test -f 'clients/xdvi/xdvi.man.sed' then echo shar: "will not over-write existing file 'clients/xdvi/xdvi.man.sed'" else sed 's/^X//' << \SHAR_EOF > 'clients/xdvi/xdvi.man.sed' X.TH XDVI 1 "16 December 1988" "X11R3" X.SH NAME Xxdvi \- preview TeX output in X window X.SH SYNOPSIS X.B xdvi X[ X.BI \-s " shrink" X] X[ X.BI \-S " density" X] X[ X.BI \-p " pixels" X] X[ X.B \-l X] X[ X.B \-rv X] X[ X.BI \-fg " color" X] X[ X.BI \-bg " color" X] X[ X.BI \-hl " color" X] X[ X.BI \-bd " color" X] X[ X.BI \-ms " color" X] X[ X.BI \-geometry " geometry" X| X.BI = " geometry" X] X[ X.BI \-display " host:display" X| X.I host:display X] X.I dvi_file X.SH DESCRIPTION X.I Xdvi Xdisplays the DVI output file X.I dvi_file Xin an X window. The options do something that the author felt was self Xevident. (No manual page was included in the source directory.) Good Xluck. X.SH ENVIRONMENT XThe environment variable X.B %%FONTPATH%% Xis used to determine where X.I TeX Xpacked pixel fonts are to be searched for. I consists of multiple Xdirectory names separated by colons (`:'). The default value of X.B %%FONTPATH%% Xis X.BR %%DEFAULT_FONT_PATH%% . X.I Xdvi Xwill search for fonts in each of the directories listed and in Xsubdirectories with the name of the font being searched for sans its Xdotted extension (some systems store fonts in directories by family and Xthen each size/scale within that directory). Thus for example, the font Xcmcsc10.329pk would be searched for as cmcsc10.329pk and cmcsc/cmcsc10.329pk Xin each of the directories listed in X.IR %%FONTPATH%% . X.PP X If that search fails, X.I xdvi Xwill search through the directories in X.B %%FONTPATH%% Xagain searching for the best match to the font specified. (It doesn't Xbother searching through subdirectories on this scan.) It looks for a font Xin the same family, whose point size is closest first, and whose Xmagnitude is closest second. X.SH BUGS XThis manual page is a token effort only. It would really be nice to get Xone that actually gave one something other than a usage statement. X.PP XThe font search algorithm is a crock. In fact, the entire program is a Xcrock. You don't want to look at the source, believe me! But, in the Xabsence of anything better, this will do ... X.SH SEE ALSO Xxtroff(1) SHAR_EOF fi exit 0 # End of shell archive