[comp.unix.ultrix] mkfontdir under DECwindows

grunwald@flute.cs.uiuc.edu (Dirk Grunwald) (07/04/89)

I found out how to install fonts under DECwindows.

The DECwindows server doesn't use a fonts.dir file; when you specify
an additional font path (who knows how you do this if you don't have
xset from the MIT tape), the server reads that directory and does
the equivilent of a mkfontdir right then.

This is, of course, very slow, but I suppose that it only gets done
on login. However, one could certainly imagine more clever schemes
to maintain a cached copy of that information that is rebuilt whenever
it's determined that it might be out of date.

Also, it appears that, under DECwindows, when you request a font that
isn't available, it simply gives you *something* -- before properly
installing the ``cmr10.85'' font used by texx2, I did ``xfd -fn cmr10.85''
and got back another font -- certainly not the one I asked for, nor
an error message.

--
Dirk Grunwald -- Univ. of Illinois 		  (grunwald@flute.cs.uiuc.edu)

grunwald@flute.cs.uiuc.edu (Dirk Grunwald) (08/08/89)

ok, i give - does anyone know how to install fonts under DECwindows?
I looked at the man page for `dxfc' (their bdftosnf) and it doesn't
say anything.

mkfontdir doesn't exist, nor does it recognize their .snf format,
and the DECwindow font directories don't have fonts.dir files.
--
Dirk Grunwald -- Univ. of Illinois 		  (grunwald@flute.cs.uiuc.edu)

geb@amber.Rational.COM (Gary Barnes) (08/15/89)

Here is a fragment of a DCL command file that we use to install a program
that requires special fonts on VMS.  It locates the .bdf files in the default
directory, compiles them using the font compiler, and then copies them into
the fonts directory.  Just reboot after that and you are set.

Check Appendix A of the Guide to Xlib Programming; MIT C Binding for what
little information seems to be available.

	Gary

$!--Fonts usable by the server go here.
$!  Use one of the User_* elements in the search path named DECW$FONT:.
$!  The one you use is determined by the type of screen you have.  DECW$FONT
$!  should already be set up for your hardware so just use the one mentioned
$!  there.
$!	SHOW LOGICAL/TABLE=DECW$SERVER0_TABLE DECW$FONT
$
$    FONTDIR     := SYS$COMMON:[SYSFONT.DECW.USER_75DPI]
$!   FONTDIR     := SYS$COMMON:[SYSFONT.DECW.USER_100DPI]
$
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$! Install the fonts
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$
$ Next_Font :
$    NAME = f$search( "*.bdf" )
$    if NAME .eqs. "" then goto Fonts_Compiled
$	CMD = "font " + NAME + "/minbox"
$	write/symbol sys$output CMD
$	CMD
$	NAME = f$parse(NAME, , , "NAME") + ".DECW$FONT"
$	CMD = "copy " + NAME + " " + FONTDIR + NAME
$	write/symbol sys$output CMD
$	CMD
$    goto Next_Font
$ Fonts_Compiled :
$    CMD = "delete *.DECW$FONT;*"
$    write/symbol sys$output CMD
$    CMD
$    type sys$input
*******************************************************************************
* You will have to reboot any DECwindows machines that share this font        *
* directory before those machines will be able to successfully use the new    *
* fonts.  You may also wish to purge the font directory.  Note that purging   *
* old versions of fonts may cause running servers to be unable to find those  *
* fonts because the DECwindows server remembers not only file names but also  *
* version numbers.  A reboot causes a server to use the latest versions.      *
*******************************************************************************
$    return
$

bcking@io.UUCP (Christine King x4426) (08/16/89)

If you have your FOO.BDF file, you do this:

    $ FONTCOMPILER /OUT=FOO.DECW$FONT FOO.BDF

Then you copy the resulting FOO.DECW$FONT file into the default DECW
font directory hierarchy.  For us that's SYS$COMMON:[SYSFONT.DECW.*],
where "*" is probably "75DPI".

The font doesn't actually become known to DECWindows until the next
time an XSetFontPath() is done, probably at boot time.

If you don't want to use the System font library, you can put your
font wherever is convenient for you.  Then your application has to do
its own XSetFontPath(), probably concatenating your directory onto the
default DECW$FONT:.  Warning: It can take a good 30 seconds for X to
recache the font names when you do that!



-- 
MONIKER:	Christine King
UUCP:		...{mit-eddie,ihnp4!harvard!bbn,sun!sunne}!ileaf!bcking
PHONE:		(617) 577-9800
USMAIL:		Interleaf Inc, Ten Canal Park, Cambridge MA 02141

graham@fuel.dec.com (kris graham) (08/23/89)

>ok, i give - does anyone know how to install fonts under DECwindows?
>I looked at the man page for `dxfc' (their bdftosnf) and it doesn't
>say anything.

>mkfontdir doesn't exist, nor does it recognize their .snf format,
>and the DECwindow font directories don't have fonts.dir files.
>--
>Dirk Grunwald -- Univ. of Illinois 		  (grunwald@flute.cs.uiuc.edu)

%man bdftosnf   [ also, 'man xfc'']

NAME
     bdftosnf - BDF to SNF font compiler for X11

SYNTAX
     bdftosnf [-p#] [-s#] [-m] [-l] [-M] [-L] [-w] [-t] [bdf-
     file]

DESCRIPTION
     The bdftosnf command reads a Character Bitmap Distribution
     Format (BDF) font from the specified file (or from standard
     input if no file is specified) and writes an X11 server nor-
     mal font (SNF) to standard output.

OPTIONS
     -p#     Force the glyph padding to a specific number.  The
             legal values are 1, 2, 4, and 8.  -s# Force the
             scanline unit padding to a specific number.  The
             legal values are 1, 2, and 4.

     -m      Force the bit order to most significant bit first.

     -l      Force the bit order to least significant bit first.

     -M      Force the byte order to most significant bit first.

     -L      Force the byte order to least significant bit first.

     -w      Print warnings if the character bitmaps have bits
             set to one outside of their defined widths.

     -t      Expand glyphs in terminal-emulator fonts to fill the
             bounding box.

SEE ALSO
     X(1X), Xserver(X)










-- 
Christopher Graham          
Digital Equipment Corp            
Ultrix Resource Center