xfontsel(1X) xfontsel(1X)NAME xfontsel - displays fonts SYNTAX xfontsel [toolkit-option]... [-pattern font] [-print] [-sample text] DESCRIPTION xfontsel provides a simple way to display the fonts known to your X server, examine samples of each, and retrieve the X Logical Font Description (XLFD) full name for a font. If you do not specify the -pattern option, all fonts with XLFD 14-part names are selectable. Options The xfontsel command accepts these options: -pattern font Causes xfontsel to make available a subset of fonts, as specified by font. The value of font can be par- tially or fully qualified. For example, -pattern *medium* selects the subset of fonts that contains the string medium somewhere in the font name. Be careful about escaping wildcard characters in your shell. -print Writes the selected font specifier to standard out- put when you activate the ``quit'' button. You can make the font specifier the PRIMARY (text) selection by activating the ``select'' button, whether you use the -print option or not. -sample text Overrides the default sample text that is used to display the selected font. Interactions Clicking the mouse button or pressing the LEFT ARROW or IGHT ARROW key while the pointer is in one of the XLFD field names pops up a menu of the currently-known possibilities for that field. If previous choices of other fields were made, only values for fonts that match the previously selected fields are selectable. To make other values select- able, deselect some other field(s) by choosing the * entry in that field. Unselectable values may be omitted from the menu entirely as a configuration option. See the ShowUnselectable resource in the next section, ``Resources.'' Whenever any change is made to a field value, xfontsel asserts ownership of the PRIMARY_FONT selec- tion. Other client applications (for example, xterm) may then retrieve the selected font specification. November, 1990 1
xfontsel(1X) xfontsel(1X)Clicking the ``select'' button causes the currently selected font name to become the PRIMARY text selection as well as the PRIMARY_FONT selection. This allows you to paste the string into other applications. The ``select'' button remains highlighted to remind you of this fact, and is no longer highlighted when some other application takes the PRIMARY selection away. The ``select'' button is a toggle; clicking it when it is highlighted causes xfontsel to release the selection ownership and no longer highlight the button. Clicking the ``select'' button twice is the only way to cause xfontsel to release the PRIMARY_FONT selection. Resources The application class is XFontSel. Most of the user inter- face is configured in the application defaults file. If this file is missing, a warning message is printed to standard output, and the resulting window is nearly incomprehensible. Most of the significant parts of the widget hierarchy are documented in the application defaults file, /usr/lib/X11/app-defaults/XFontSel. The application-specific resources are: cursor (class Cursor) Specifies the cursor for the application window. pattern (class Pattern) Specifies the font name pattern for selecting a sub- set of available fonts and is equivalent to the -pattern option. Most useful patterns contain at least one field delimiter; for example, *-m-* for monospaced fonts. printOnQuit (class PrintOnQuit) If TRUE, the currently selected font name is printed to standard output when the ``quit'' button is ac- tivated. Equivalent to the -print option. The Widget-specific resources are: showUnselectable (class ShowUnselectable) Specifies, for each field menu, whether or not to show values that are not currently selectable, based on previous field selections. If shown, the un- selectable values are clearly identified as such and do not highlight when the pointer is moved down the menu. fieldN.menu.options.showUnselectable is the full name of this resource. The class is MenuButton.SimpleMenu.Options. ShowUnselectable, where N is replaced with the field number, starting with the left-most field numbered 2 November, 1990
xfontsel(1X) xfontsel(1X)0. The default is TRUE for all but field 11 (aver- age width of characters in font) and FALSE for field 11. If you never want to see unselectable entries, specifying *menu.options.showUnselectable:FALSE is a reasonable specification in a resource file. LIMITATIONS Sufficiently ambiguous patterns can be misinterpreted and lead to an initial selection string that may not correspond to what the user intended and that may cause the initial sample text output to fail to match the proffered string. Selecting any new field value corrects the sample output, though this may possibly result in no matching font. The xfontsel command should be able to return a FONT for the PRIMARY selection, not just a STRING. Any change in a field value causes xfontsel to assert owner- ship of the PRIMARY_FONT selection. When running xfontsel on a slow machine, it is possible for the user to request a field menu before the font names have been completely parsed. An error message indicating a miss- ing menu is printed on the standard error, but otherwise nothing bad (or good) happens. NOTES Copyright 1989 by the Massachusetts Institute of Technology See X(1X) for a full statement of rights and permissions. Author: Ralph R. Swick, Digital Equipment Corporation and MIT Project Athena FILES $XFILESEARCHPATH/XFontSel SEE ALSO xrdb(1X) November, 1990 3