XFD(1)
๐ XFD(1) ๐
โจ NAME โจ
okay so the manual name is XFD(1), and the tool is xfd, which displays all the characters in an X font ๐
๐ง SYNOPSIS ๐ง
xfd [-options ...] -fn fontname
xfd [-options ...] -fa fontname
๐ DESCRIPTION ๐
bestie, the xfd utility makes a window for you ๐ช It shows the name of the font being displayed, a row of command buttons, a few lines of text with character metrics, and a grid with one glyph per cell ๐ธ Characters go in increasing order, left to right, then top to bottom. The top left cell starts at character number 0, unless you pass -start, in which case it starts at whatever number you gave it โจ
The grid is made of boxes, and every box is big enough to hold any single character in the font ๐ฆ Each glyph gets drawn with the PolyText16 request (the one used by the Xlib routine XDrawString16) or with the XftDrawString32 routine. Which one you get depends on whether you used -fn or -fa ๐ฆ If you add -box, each character gets a rectangle around it, showing exactly where an ImageText16 request (the one used by the Xlib routine XDrawImageString16) would paint background color ๐จ
Normally each glyph sits in the upper left corner of its grid cell. But if a glyph has a negative left bearing, or an unusually large ascent, descent, or right bearing (cursor font is a total diva about this ๐), some characters won't show up in their own cells. Use -center to force every glyph into the middle of its cell ๐ซถ
Not every character fits in the window at once, so there are pages. Press the Next button at the top of the window to see the next page, Prev to go back, and Quit to leave xfd ๐
Click on any character and its metrics show up at the top of the window: index, width, bearings, ascent and descent ๐
The font name at the top is the full name of the font, as the server decides it. If you want lists of fonts plus more detailed metrics and properties, check out xlsfonts and fc-list ๐
๐ OPTIONS ๐
xfd takes all the standard toolkit command line options, plus the extra ones below ๐
-fn fontโ picks the core X server side font to display ๐ค You can also set this with the FontGridfontresource. A font has to be specified, no skipping!-fa fontโ picks a Xft font to display instead ๐ซ You can also set this with the FontGridfaceresource. You have to give a font pattern here.-boxโ draws a box around the area that an ImageText request would fill with background color ๐ฆ You can also set it with the FontGridboxCharsresource. Default isFalse.-centerโ centers each glyph inside its grid cell ๐ฏ You can also set it with the FontGridcenterCharsresource. Default isFalse.-start numberโ sets the glyph index for the upper left corner of the grid ๐ข This is how you peek at characters sitting anywhere in the font. You can also set it with the FontGridstartCharresource. Default is0.-bc colorโ the color used when ImageText boxes get drawn ๐จ You can also set it with the FontGridboxColorresource.-rows numrowsโ sets how many rows the grid has ๐ You can also set it with the FontGridcellRowsresource.-columns numcolsโ sets how many columns the grid has ๐ You can also set it with the FontGridcellColumnsresource.
๐ง WIDGETS ๐ง
ngl, it helps to know the widgets that make up xfd if you're setting resources. In the notation below, indentation shows the hierarchy ๐ช Each line gives the widget class name first, then the widget instance name. The application class name is Xfd.
Xfd xfd
Paned pane
Label fontname
Box box
Command quit
Command prev
Command next
Label select
Label metrics
Label range
Label start
Form form
FontGrid grid
๐ซง FONTGRID RESOURCES ๐ซง
The FontGrid widget is application-specific ๐งฉ It's a subclass of the Simple widget from the Athena widget set. Its resources have their effects and instance names listed in the OPTIONS section. To get the class name, capitalize the first letter of the instance name ๐
๐ฆ APPLICATION SPECIFIC RESOURCES ๐ฆ
Here are the instance names of the application specific resources. Same trick as before: capitalize the first letter of the instance name to get the class name. These are not going to be super exciting unless you're localizing xfd for another language ๐
selectFormatโ a printf-style format string that shows info about the selected character ๐ The default is"character 0x%02x%02x (%u,%u) (%#o,%#o)". The arguments after the format string arechar.byte1,char.byte2,char.byte1,char.byte2,char.byte1,char.byte2. Herechar.byte1is byte 1 of the selected character, andchar.byte2is byte 2 of it.metricsFormatโ a printf-style format string for the character metrics ๐ The default is"width %d; left %d, right %d; ascent %d, descent %d (font %d, %d)". The arguments after it are the character metrics width, lbearing, rbearing, character ascent, character descent, font ascent, and font descent.rangeFormatโ a printf-style format string for the range of characters on screen right now ๐บ๏ธ The default is"range: 0x%02x%02x (%u,%u) thru 0x%02x%02x (%u,%u)". The arguments after it are these fields from the XFontStruct you get back when opening the font: min_byte1, min_char_or_byte2, min_byte1, min_char_or_byte2, max_byte1, max_char_or_byte2, max_byte1, max_char_or_byte2.startFormatโ a printf-style format string for the character in the upper left corner of the font grid ๐ท The default is"upper left: 0x%04x (%d,%d)". The arguments after it are the new character, the high byte of the new character, and the low byte of the new character.nocharFormatโ a printf-style format string shown when the selected character doesn't exist ๐ The default is"no such character 0x%02x%02x (%u,%u) (%#o,%#o)". The arguments after it are the same as for theselectFormatresource.
๐ SEE ALSO ๐
X(7), xlsfonts(1), xrdb(1), xfontsel(1), fc-list(1), fonts.conf(5), X Logical Font Description Conventions ๐
๐ BUGS ๐
the program should skip over pages full of non-existent characters. right now it doesn't, so you might be stuck staring at empty pages ๐
๐ AUTHOR ๐
Jim Fulton, MIT X Consortium ๐ The previous program with the same name was by Mark Lillibridge, MIT Project Athena ๐ซถ
โจ X Version 11, xfd 1.1.4, XFD(1) โจ that's the whole tea, bestie. now go be iconic ๐๐ ๐ฆ
๐ฆ where this page comes from
- debian trixie: x11-utils 7.7+7
- opensuse-leap 16.0: xfd 1.1.4-bp160.1.12 ยท X11
- opensuse-leap 16.0: xfd 1.1.4-bp160.1.12 ยท X11
- opensuse-leap 16.0: xfd 1.1.4-bp160.1.12 ยท X11
- opensuse-leap 16.0: xfd 1.1.4-bp160.1.12 ยท X11
- ubuntu noble: x11-utils 7.7+6build2
- ubuntu questing: x11-utils 7.7+7
- ubuntu resolute: x11-utils 7.7+7build1
- ubuntu stonking: x11-utils 7.7+7build1
- Copyright 1989, 1994, 1998 The Open Group
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms