'\"macro stdmacro
.if n .pH g1.xfd @(#)xfd	40.3 of 1/9/90
.nr X
.if \nX=0 .ds x} XFD 1 "9/1/88" "X\s-2WIN\s+2 3.0" "\&"
.if \nX=1 .ds x} XFD 1 "9/1/88" "X\s-2WIN\s+2 3.0"
.if \nX=2 .ds x} XFD 1 "" "\&"
.if \nX=3 .ds x} XFD "" "" "\&"
.TH \*(x}
.SH NAME
xfd - font displayer for X
.SH SYNOPSIS
.B xfd
[-options ...] -fn \fIfontname\fP
.SH "OPTIONS"
.TP 8
.B \-display \fIdisplay\fP
Specifies the display to use.
.PP
.TP 8
.B \-geometry \fIgeometry\fP
Specifies an initial window geometry.
.PP
.TP 8
.B \-bw \fInumber\fP
Allows you to specify the width of the window border in pixels.
.PP
.TP 8
.B \-rv
The foreground and background colors will be switched.  The default colors
are black on white.
.PP
.TP 8
.B \-fw
Overrides a previous choice of reverse video.  The
foreground and background colors will not be switched.
.PP
.TP 8
.B \-fg \fIcolor\fP
On color displays, determines the foreground color (the color of the text).
.PP
.TP 8
.B \-bg \fIcolor\fP
On color displays, determines the background color.
.PP
.TP 8
.B \-bd \fIcolor\fP
On color displays, determines the color of the border.
.PP
.TP 8
.B \-bf \fIfontname\fP
Specifies the font to be used for the messages at the bottom of the window.
.PP
.TP 8
.B \-tl \fItitle\fP
Specifies that the title of the displayed window should be \fItitle\fP.
.PP
.TP 8
.B \-in \fIiconname\fP
Specifies that the name of the icon should be \fIiconname\fP.
.PP
.TP 8
.B \-icon \fIfilename\fP
Specifies that the bitmap in file \fIfilename\fP should be used for the icon.
.PP
.TP 8
.B \-verbose
Specifies that extra information about the font should be displayed.
.PP
.TP 8
.B \-gray
Specifies that a gray background should be used.
.PP
.TP 8
.B \-start \fIcharnum\fP
Specifies that character number \fIcharnum\fP should be the first character
displayed.
.PP
.SH DESCRIPTION
.I Xfd
creates a window in which the characters in the named font are displayed.  The
characters are shown in increasing order from left to right, top to
bottom.  The first character displayed at the top left will be character
number 0 unless the -start option has been supplied in which case the
character with the number given in the -start option will be used.
.PP
The characters are displayed in a grid of boxes, each large enough to hold 
any single
character in the font.
If the -gray option has been supplied, the characters will be displayed using
XDrawImageString using the foreground and background colors on a
gray background.  This permits determining exactly how XDrawImageString will
draw any given character.  If -gray has not been supplied, the characters will
simply be drawn using the foreground color on the background color.
.PP
All the characters in the font may not fit in the window at once.
To see additional characters, click the right mouse button on the window.
This will cause the next window full of characters to be displayed.
Clicking the left mouse button on the window will cause the previous
window full of characters to be displayed.
.I Xfd
will beep if an attempt is made to go back past the 0th character.
.PP
Note that if the font is a 8 bit font, the characters 256-511 (100-1ff in
hexidecimal),
512-767 (200-2ff in hexidecimal), ... 
will display exactly the same as the characters 0-255 (00-ff in hexidecimal).
.I Xfd
by default creates a window big enough to display 16 rows of 16 columns 
(totally 256 characters).
.PP
Clicking the middle button on a character will cause that character's
number to be displayed in both decimal and hexidecimal at the bottom of the
window.  If verbose mode is selected, additional information about that
particular character will be displayed as well.  The displayed information
includes the width of the character, its left bearing, right bearing, ascent,
and its descent.  If verbose mode is selected, typing '<' or '>' into the
window will display the minimum or maximum values respectively 
taken on by each of these fields over the entire font.
.PP
The font name is interpreted by the X server.
To obtain a list of all the fonts available, use \fIxlsfonts(1)\fP.
.PP
The window stays around until the xfd process is killed
or one of 'q', 'Q', ' ', or ctrl-c is typed into the
.I Xfd
window.
.SH "X DEFAULTS"
.PP
\fIXfd\fP uses the following X resources:
.PP
.TP 14
.B BorderWidth
Set the border width of the window.
.PP
.TP 14
.B BorderColor
Set the border color of the window.
.PP
.TP 14
.B ReverseVideo
If ``on'', reverse the definition of foreground and background color.
.PP
.TP 14
.B Foreground
Set the foreground color.
.PP
.TP 14
.B Background
Set the background color.
.PP
.TP 14
.B BodyFont
Set the font to be used in the body of the window.  (I.e., for messages, etc.)
This is not the font that \fIXfd\fP displays, just the font it uses
to display information about the font being displayed.
.PP
.TP 14
.B IconName
Set the name of the icon.
.PP
.TP 14
.B IconBitmap
Set the file we should look in to get the bitmap for the icon.
.PP
.TP 14
.B Title
Set the title to be used.
.SH "SEE ALSO"
X(1), xlsfonts(1), xrdb(1)
.SH BUGS
It should display the name of the font somewhere.
.PP
Character information displayed in verbose mode is sometimes clipped to the
window boundary, hiding it from view.
.PP
It should be rewritten to use the X toolkit.
.PP
It should skip over pages full of non-existent characters.
.SH COPYRIGHT
Copyright 1988, Massachusetts Institute of Technology.
