X Version 11 (Release 6.1)

xfontsel(X1)


xfontsel -- point and click interface for selecting X11 font names

Synopsis

xfontsel [-toolkitoption...] [-pattern fontname] [-print] [-sample text]

Description

The xfontsel application 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 -pattern is not specified, all fonts with XLFD 14-part names will be selectable. To work with only a subset of the fonts, specify -pattern followed by a partially or fully qualified font name; for example, -pattern *medium* will select that subset of fonts which contain the string ``medium'' somewhere in their font name. Be careful about escaping wildcard characters in your shell.

If -print is specified on the command line the selected font specifier will be written to standard output when the quit button is activated. Regardless of whether or not -print was specified, the font specifier may be made the PRIMARY (text) selection by activating the select button.

The -sample option specifies the sample text to be used to display the selected font, overriding the default.

Interactions

Clicking any pointer button in one of the XLFD field names will pop up a menu of the currently known possibilities for that field. If previous choices of other fields were made, only values for fonts which matched the previously selected fields will be selectable; to make other values selectable, you must 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, below. Whenever any change is made to a field value, xfontsel will assert ownership of the PRIMARY_FONT selection. Other applications (see, for example, xterm) may then retrieve the selected font specification.

Clicking the left pointer button in the select widget will cause the currently selected font name to become the PRIMARY text selection as well as the PRIMARY_FONT selection. This then allows you to paste the string into other applications. The select button remains highlighted to remind you of this fact, and de-highlights when some other application takes the PRIMARY selection away.

The select widget is a toggle; pressing it when it is highlighted will cause xfontsel to release the selection ownership and de-highlight the widget. Activating the select widget twice is the only way to cause xfontsel to release the PRIMARY_FONT selection.

Resources

The application class is XFontSel. Most of the user interface is configured in the app-defaults file; if this file is missing a warning message will be printed to standard output and the resulting window will be nearly incomprehensible.

Most of the significant parts of the widget hierarchy are documented in the app-defaults file /usr/lib/X11/app-defaults/XFontSel.

Application specific resources:


cursor class (Cursor)
Specifies the cursor for the application window.

pattern class (Pattern)
Specifies the font name pattern for selecting a subset of available fonts. Equivalent to the -pattern option. Most useful patterns will 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 activated. Equivalent to the -print option.

Widget hierarchy

In order to specify resources, it is useful to know the hierarchy of the widgets which compose xfontsel. In the notation below, indentation indicates hierarchical structure. The widget class name is given first, followed by the widget instance name.
   XFontSel  xfontsel
     XmPanedWindow  pane
       XmpTable  commandBox
         XmPushButton  resetButton
         XmPushButton  quitButton
         XmToggleButton  ownButton
         XmLabel  countLabel
       XmRowColumn  fieldBox
         XmPushButton  field0
           XmMenuShell  popup_menu
             XmRowColumn  menu
               XmPushButton  any
               XmPushButton  adobe
               XmPushButton  bigelow & holmes
               XmPushButton  bitstream
               XmPushButton  dec
               XmPushButton  misc
               XmPushButton  schumacher
               XmPushButton  sony
               XmPushButton  sun
         XmPushButton  field1
           XmMenuShell  popup_menu
             XmRowColumn  menu
               XmPushButton  any
               XmPushButton  clean
               XmPushButton  courier
               XmPushButton  fixed
               XmPushButton  helvetica
               XmPushButton  itc avant garde gothic
               XmPushButton  itc lubalin graph
               XmPushButton  itc souvenir
               XmPushButton  menu
               XmPushButton  new century schoolbook
               XmPushButton  open look glyph
               XmPushButton  symbol
               XmPushButton  terminal
               XmPushButton  times
         XmPushButton  field2
           XmMenuShell  popup_menu
             XmRowColumn  menu
               XmPushButton  any
               XmPushButton  nil
               XmPushButton  bold
               XmPushButton  book
               XmPushButton  demi
               XmPushButton  light
               XmPushButton  medium
         XmPushButton  field3
           XmMenuShell  popup_menu
             XmRowColumn  menu
               XmPushButton  any
               XmPushButton  nil
               XmPushButton  i
               XmPushButton  o
               XmPushButton  r
         XmPushButton  field4
           XmMenuShell  popup_menu
             XmRowColumn  menu
               XmPushButton  any
               XmPushButton  nil
               XmPushButton  double wide
               XmPushButton  narrow
               XmPushButton  normal
               XmPushButton  semicondensed
               XmPushButton  wide
         XmPushButton  field5
           XmMenuShell  popup_menu
             XmRowColumn  menu
               XmPushButton  any
               XmPushButton  nil
               XmPushButton  gs
         XmPushButton  field6
           XmMenuShell  popup_menu
             XmRowColumn  menu
               XmPushButton  any
               XmPushButton  [ pixel-size ]
         XmPushButton  field7
           XmMenuShell  popup_menu
             XmRowColumn  menu
               XmPushButton  any
               XmPushButton  [ point-size ]
         XmPushButton  field8
           XmMenuShell  popup_menu
             XmRowColumn  menu
               XmPushButton  any
               XmPushButton  75
               XmPushButton  100
         XmPushButton  field9
           XmMenuShell  popup_menu
             XmRowColumn  menu
               XmPushButton  any
               XmPushButton  75
               XmPushButton  100
         XmPushButton  field10
           XmMenuShell  popup_menu
             XmRowColumn  menu
               XmPushButton  any
               XmPushButton  c
               XmPushButton  m
               XmPushButton  p
         XmPushButton  field11
           XmMenuShell  popup_menu
             XmRowColumn  menu
               XmPushButton  any
               XmPushButton  [ width's ]
         XmPushButton  field12
           XmMenuShell  popup_menu
             XmRowColumn  menu
               XmPushButton  any
               XmPushButton  adobe
               XmPushButton  dec
               XmPushButton  iso8859
               XmPushButton  jisx0201.1976
               XmPushButton  jisx0208.1983
               XmPushButton  sunolglyph
         XmPushButton  field13
           XmMenuShell  popup_menu
             XmRowColumn  menu
               XmPushButton  any
               XmPushButton  0
               XmPushButton  1
               XmPushButton  dectech
               XmPushButton  fontspecific
       XmLabel  fontName
       XmLabel  sampleText
       XmSash  sash
       XmSeparatorGadget  separator
       XmSash  sash
       XmSeparatorGadget  separator
       XmSash  sash
       XmSeparatorGadget  separator
       XmSash  sash
       XmSeparatorGadget  separator

Files

$XFILESEARCHPATH /XFontSel

Warnings

Sufficiently ambiguous patterns can be misinterpreted and lead to an initial selection string which may not correspond to what the user intended and which may cause the initial sample text output to fail to match the proffered string. Selecting any new field value will update the sample output, though possibly resulting in no matching font.

Should be able to return a FONT for the PRIMARY selection, not just a STRING.

Any change in a field value will cause xfontsel to assert ownership of the PRIMARY_FONT selection. Perhaps this should be parameterized.

When running 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 missing menu is printed to stderr but otherwise nothing bad (or good) happens.

References

xrdb(X1)


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004