.TH xfd "" "" "X Utility"
.PC "Display all the characters in an X font"
\fBxfd [\-toolkotoptions \fB...] \-fn \fIfontname\fR
.PP
.HS
.SH Options:
.IC "\fB\-bc \fIcolor\fR"
Use
.I color
if ImageText boxes are drawn
.IC "\fB\-bd \fIcolor\fR"
Set the color of the border to \fIcolor\fR
.IC "\fB\-bg \fIcolor\fR"
Set the color of the background to \fIcolor\fR
.IC \fB\-box\fR
Draw a box around each character
to outline the area
that a request to ImageText would fill with background color
.IC "\fB\-bw \fIpixels\fR"
Set the width of the border to \fIpixels\fR
.IC \fB\-center\fR
Center each character within its cell
.IC "\fB\-display \fIhost\^\fB[:\fIserver\^\fB][.\fIscreen\^\fB]\fR"
Display the client's window on screen number \fIscreen\fR
of \fIserver\fR on host system \fIhost\fR
.IC "\fB\-fg \fIcolor\fR"
Set the color of the foreground to \fIcolor\fR
.IC "\fB\-fn \fIfont\fR"
Display
.I font
.IC "\fB\-geometry \fIgeometry\fR"
Set the geometry of the program's window to \fIgeometry\fR
.IC \fB\-rv\fR
Simulate reverse video by exchanging the foreground and background colors
.IC "\fB\-start \fInumber\fR"
Display the font beginning with character
.IR number .
The default is zero.
.IC "\fB\-xrm \fIresourcestring\fR"
Use \fIresourcestring\fR to define a resource
.HE
The utility
.B xfd
opens a window that displays the name of the font being displayed,
a row of command buttons, several lines of text for displaying
character metrics, and a grid that contains one glyph per cell.
The characters are shown in increasing ASCII order from left to right,
top to bottom.
The first character displayed at the top left is character zero
unless the you have used the command-line option
.B \-start
(described below), in which case
.B xfd
uses the character with the number given in the option
.BR \-start .
.PP
.B xfd
displays the characters in a grid of boxes, each large enough to hold
any character in the font.
Each character glyph is drawn using the PolyText16 request (used by the
.B Xlib
routine
.BR XDrawString16 ).
.PP
If you use the option
.BR \-box ,
.B xfd
draws a rectangle around each character that shows
where an ImageText16 request (used by the
.B Xlib
routine
.BR XDrawImageString16 )
would display background color.
.PP
The origin of each glyph is normally set so that the character is drawn in
the upper left hand corner of the grid cell.
However, if a glyph has a negative left bearing or an unusually large ascender,
descender, or right bearing
(as is the case with the
.B cursor
font),
some characters may not appear in their own cells.
Use the command-line option
.B \-center
to force
.B xfd
to center each glyph within its cell.
.PP
.B xfd
displays the following buttons in its window:
.IP \fK(Next_Page)\fR
.B xfd
may not be able to fit all of a font's characters into the window at once.
Press this button to see the next page of glyphs.
.IP \fK(Prev_Page)\fR
Display the previous page of glyphs.
.IP \fK(Quit)\fR
Exit
.BR xfd .
.PP
To display the metrics (index, width, bearings, ascent, and descent) for
a character, click its cell in the display area.
.PP
The font name displayed at the top of the window is the full name of the 
font, as determined by the server.
The command
.B xlsfonts
generates lists of fonts,
as well as more detailed summaries of their metrics and properties.
.SH "Options"
.B xfd
recognizes the following command-line options:
.IP "\fB\-bc \fIcolor\fR" 0.75i
Use
.I color
if ImageText boxes are drawn.
.IP "\fB\-bd \fIcolor\fR" 0.75i
Set the color of the border to
.IR color .
.IP "\fB\-bg \fIcolor\fR"
Set the color of the background to
.IR color .
.IP \fB\-box\fR
Draw a box around each character
to outline the area
that a request to ImageText would fill with background color.
.IP "\fB\-bw \fIpixels\fR"
Set the width of the border to
.IR pixels .
.IP \fB\-center\fR
Center each character within its cell.
.IP "\fB\-display \fIhost\^\fB[:\fIserver\^\fB][.\fIscreen\^\fB]\fR"
Display the client's window on screen number
.I screen
of
.I server
on host system
.IR host .
.IP "\fB\-fg \fIcolor\fR"
Set the color of the foreground to
.IR color .
.IP "\fB\-fn \fIfont\fR"
Display
.IR font .
.IP "\fB\-geometry \fIgeometry\fR"
Set the geometry of the program's window to
.IR geometry .
The term ``geometry'' means the dimensions of the window and its location
on the screen.
.I geometry
has the form \fIwidth\(muheight\(+-xoffset\(+-yoffset\fR.
.IP \fB\-rv\fR
Simulate reverse video by exchanging the foreground and background colors.
.IP "\fB\-start \fInumber\fR"
Display the font beginning with character
.IR number .
The default is zero.
.IP "\fB\-xrm \fIresourcestring\fR"
Use
.I resourcestring
to define a resource.
.SH Example
.II "cursor^image of cursors"
To display the cursor font \(em that is, the font of predefined shapes for
the mouse cursor \(em type the command:
.DM
	xfd \-center \-fn cursor
.DE
.PP
.B xfd
displays the following window on your screen:
.PH 1 1 \*(XD/xfd.eps
.PP
Note that a cursor consists of two bit-mapped images:
the cursor itself, and a mask that goes around it.
.II "cursor^names"
.II cursorfont.h
The names of the cursors are defined in file
.BR /usr/X11/include/X11/cursorfont.h .
.SH "See Also"
.B
xfontsel,
xlsfonts,
xrdb,
X utilities
.R
.SH Notes
.B xfd
does not skip pages full of non-existent characters.
.PP
Copyright \(co 1989, Massachusetts Institute of Technology.
.PP
.II "Fulton, Jim"
.II "Lillibridge, Mark"
.B xfd
was written by Jim Fulton of MIT X Consortium, based on a previous program
of the same name that was written by Mark Lillibridge of MIT Project Athena.
