"Initial commit to Gerrit"
[profile/ivi/xorg-utils.git] / xfd / xfd.man
1 .\" $Xorg: xfd.man,v 1.4 2001/02/09 02:05:42 xorgcvs Exp $
2 .\" Copyright 1989, 1994, 1998  The Open Group
3 .\" 
4 .\" Permission to use, copy, modify, distribute, and sell this software and its
5 .\" documentation for any purpose is hereby granted without fee, provided that
6 .\" the above copyright notice appear in all copies and that both that
7 .\" copyright notice and this permission notice appear in supporting
8 .\" documentation.
9 .\" 
10 .\" The above copyright notice and this permission notice shall be included
11 .\" in all copies or substantial portions of the Software.
12 .\" 
13 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
14 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16 .\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
17 .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
18 .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
19 .\" OTHER DEALINGS IN THE SOFTWARE.
20 .\" 
21 .\" Except as contained in this notice, the name of The Open Group shall
22 .\" not be used in advertising or otherwise to promote the sale, use or
23 .\" other dealings in this Software without prior written authorization
24 .\" from The Open Group.
25 .\"
26 .\" $XFree86: xc/programs/xfd/xfd.man,v 1.9 2003/04/19 23:49:27 herrb Exp $
27 .\"
28 .TH XFD 1 __xorgversion__
29 .SH NAME
30 xfd \- display all the characters in an X font
31 .SH SYNOPSIS
32 .B xfd
33 [\-options ...] \fB\-fn\fP \fIfontname\fP
34 .PP
35 .B xfd
36 [\-options ...] \fB\-fa\fP \fIfontname\fP
37 .SH DESCRIPTION
38 The \fIxfd\fP utility creates a window containing the name of the font being
39 displayed, a row of command buttons, several lines of text for displaying
40 character metrics, and a grid containing one glyph per cell.  The
41 characters are shown in increasing order from left to right, top to
42 bottom.  The first character displayed at the top left will be character
43 number 0 unless the \fB\-start\fP option has been supplied in which case the
44 character with the number given in the \fB\-start\fP option will be used.
45 .PP
46 The characters are displayed in a grid of boxes, each large enough to hold 
47 any single character in the font.  Each character glyph is drawn using
48 the PolyText16 request (used by the \fIXlib\fP routine \fBXDrawString16\fP).
49 If the \fB\-box\fP option is given, a rectangle will be drawn around each
50 character, showing where an ImageText16 request (used by the \fIXlib\fP
51 routine \fBXDrawImageString16\fP) would cause background color to be displayed.
52 .PP
53 The origin of each glyph is normally set so that the character is drawn in
54 the upper left hand corner of the grid cell.  However, if a glyph has a 
55 negative left bearing or an unusually large ascent, descent, or right bearing 
56 (as is the case with \fIcursor\fP font), some character may not appear in their
57 own grid cells.  The \fB\-center\fP option may be used to force all glyphs to 
58 be centered in their respective cells.
59 .PP
60 All the characters in the font may not fit in the window at once.
61 To see the next page of glyphs, press the \fINext\fP button at the top 
62 of the window.  To see the previous page, press \fIPrev\fP.  To exit \fIxfd\fP,
63 press \fIQuit\fP.
64 .PP
65 Individual character metrics (index, width, bearings, ascent and descent) can
66 be displayed at the top of the window by clicking on the desired character.
67 .PP
68 The font name displayed at the top of the window is the full name of the 
69 font, as determined by the server.  See \fIxlsfonts\fP for ways to generate
70 lists of fonts, as well as more detailed summaries of their metrics and
71 properties.
72 .SH "OPTIONS"
73 .PP
74 .I xfd
75 accepts all of the standard toolkit command line options along with
76 the additional options listed below:
77 .TP 8
78 .B \-fn \fIfont\fP
79 This option specifies the core X server side font to be displayed.  
80 This can also be set with 
81 the FontGrid \fBfont\fP resource.  A font must be specified.
82 .TP 8
83 .B \-fa \fIfont\fP
84 This option specifies a Xft font to be displayed. This can also be set with 
85 the FontGrid \fBface\fP resource. A font pattern must be specified. 
86 .TP 8
87 .B \-box
88 This option indicates that a box should be displayed outlining the area
89 that would be filled with background color by an ImageText request.
90 This can also be set with
91 the FontGrid \fBboxChars\fP resource.  The default is False.
92 .TP 8
93 .B \-center
94 This option indicates that each glyph should be centered in its grid.
95 This can also be set with
96 the FontGrid \fBcenterChars\fP resource.  The default is False.
97 .TP 8
98 .B \-start \fInumber\fP
99 This option specifies the glyph index of the upper left hand corner of the
100 grid.  This is used to view characters at arbitrary locations in the font.
101 This can also be set with
102 the FontGrid \fBstartChar\fP resource.  The default is 0.
103 .TP 8
104 .B \-bc \fIcolor\fP
105 This option specifies the color to be used if ImageText boxes are drawn.
106 This can also be set with
107 the FontGrid \fBboxColor\fP resource.
108 .TP 8
109 .B \-rows \fInumrows\fP
110 This option specifies the number of rows in the grid.
111 This can also be set with
112 the FontGrid \fBcellRows\fP resource.
113 .TP 8
114 .B \-columns \fInumcols\fP
115 This option specifies the number of columns in the grid.
116 This can also be set with
117 the FontGrid \fBcellColumns\fP resource.
118 .SH WIDGETS
119 In order to specify resources, it is useful to know the 
120 widgets which compose \fIxfd\fR.  In the notation below, indentation
121 indicates hierarchical structure.  The widget class name is given first,
122 followed by the widget instance name.
123 The application class name is Xfd.
124 .sp
125 .nf
126 .ta .5i 1.0i 1.5i 2.0i 2.5i 3.0i 3.5i 4.0i 4.5i 5.0i 5.5i 6.0i 6.5i 7.0i
127 Xfd  xfd
128         Paned  pane
129                 Label  fontname
130                 Box  box
131                         Command  quit
132                         Command  prev
133                         Command  next
134                 Label  select
135                 Label  metrics
136                 Label  range
137                 Label  start
138                 Form  form
139                         FontGrid  grid
140 .fi
141 .SH FONTGRID RESOURCES
142 The FontGrid widget is an application-specific widget, and a subclass
143 of the Simple widget in the Athena widget set.  The effects and
144 instance names of this widget's resources are given in the
145 \fBOPTIONS\fP section.  Capitalize the first letter of the resource
146 instance name to get the corresponding class name.
147 .SH APPLICATION SPECIFIC RESOURCES
148 The instance names of the application specific resources
149 are given below.  Capitalize the first letter of the resource
150 instance name to get the corresponding class name.
151 These resources are unlikely to be interesting unless you are localizing
152 xfd for a different language.
153 .TP 8
154 .B selectFormat
155 Specifies a printf-style format string used to display information
156 about the selected character.  The default is "character 0x%02x%02x
157 (%u,%u) (%#o,%#o)".  The arguments that will come after the format string are
158 char.byte1, char.byte2, char.byte1, char.byte2, char.byte1, char.byte2.
159 char.byte1 is byte 1 of the selected character.  
160 char.byte2 is byte 2 of the selected character.  
161 .TP 8
162 .B metricsFormat
163 Specifies a printf-style format string used to display character
164 metrics.  The default is "width %d; left %d, right %d; ascent %d,
165 descent %d (font %d, %d)".  The arguments that will come after the
166 format string are the character metrics width, lbearing, rbearing,
167 character ascent, character descent, font ascent, and font descent.
168 .TP 8
169 .B rangeFormat
170 Specifies a printf-style format string used to display the range of
171 characters currently being displayed.  The default is "range:
172 0x%02x%02x (%u,%u) thru 0x%02x%02x (%u,%u)".  The arguments that will
173 come after the format string are the following fields from the
174 XFontStruct that is returned from opening the font:
175 min_byte1, min_char_or_byte2, min_byte1, min_char_or_byte2,
176 max_byte1, max_char_or_byte2, max_byte1, max_char_or_byte2.
177 .TP 8
178 .B startFormat
179 Specifies a printf-style format string used to display information
180 about the character at the upper left corner of the font grid.  The
181 default is "upper left: 0x%04x (%d,%d)".  The arguments that will come
182 after the format string are the new character, the high byte of the new
183 character, and the low byte of the new character.
184 .TP 8
185 .B nocharFormat
186 Specifies a printf-style format string to display when the selected
187 character does not exist.  The default is "no such character
188 0x%02x%02x (%u,%u) (%#o,%#o)".  The arguments that will come after the
189 format string are the same as for the \fBselectFormat\fP resource.
190 .SH "SEE ALSO"
191 X(__miscmansuffix__), xlsfonts(1), xrdb(1), xfontsel(1), fontconfig(3),
192 .I "X Logical Font Description Conventions"
193 .SH "BUGS"
194 The program should skip over pages full of non-existent characters.
195 .SH AUTHOR
196 Jim Fulton, MIT X Consortium; previous program of the same name by 
197 Mark Lillibridge, MIT Project Athena.
198