XmFontSelector(3X)
β¨ XmFontSelector β¨
okay so bestie, welcome to the manual page for the Font Selector widget β it's a real one from the 3X corner of the world, and it's lowkey iconic π
πΈ NAME πΈ
The Font Selector widget. That's her. That's the whole name. Periodt. π
π¦ SYNOPSIS π¦
#include <Xm/FontS.h>
π DESCRIPTION π
The Font Selector widget lets users pick a font so easily β they just choose the font family and the size, and boom, done. The bold and italic attributes can also be set for any font where they're actually available. And if your app already has a font in mind, it can pass any font to the font selector as the initial value shown to the user. The advanced features? They greatly extend the widget's functionality. No cap. π₯
π Basic Features π
So the font selector presents the user with two combination box widgets β one with a list of choices for the font family, and the other with the choices for the font size. Plus there are two independent toggle buttons that let the user make the font bold or italic or bold/italic. Underneath the font choice area there's a text widget that shows sample text of the chosen font. And that text area is editable, bestie β the user can add or remove text to see how various characters look in the chosen font. π
For the novice user, this set of features gives access to all standard fonts on the system. And the font selector dynamically removes choices that are inappropriate, so the user can freely play around with different combinations and can always be assured that once they've selected a font, it will exist on the machine the font selector is running on. Fr fr. π―
For example: if there's no Times Roman 14 point font available, and the user selects a point size of 14, then Times Roman will not be available in the family combination box. Likewise, if the user had chosen Times Roman from the family dialog box, then a size of 14 would not be shown. To have all choices available, simply choose a size and family of Any. β¨
π§ Advanced Features π§
For the advanced user, the font selector provides tremendous flexibility in font choices. By activating the options button, an additional panel of controls is presented to the user. This allows the user to:
- gain access to non-XLFD fonts
- control the resolutions of the fonts chosen
- choose from fixed or proportional fonts only
- remove the use of font scaling
- allow non iso8859-1 fonts to be viewed
- see the XLFD name the font selector is constructing
Slay. π
π Non XLFD Fonts π
By choosing the "Other Fonts" toggle from the option panel, the family and size lists β as well as the bold and italic toggles β are replaced with a combo box containing all non-XLFD fonts available on your system. This feature allows users to select non-XLFD fonts with the FontSelector. The text field of the combination box may be edited by the user, and any string entered will be interpreted as a font name. And note this: XLFD names can be typed in by hand here. This feature allows the font selector to be used to get any font on the entire system. π€―
π Resolution Control π
The font selector finds which of the two standard resolutions the current display is closest to and uses that as its default. To allow a wider range of choices, a user may choose to access fonts of a different resolution, or both 75 and 100 dpi resolutions.
πΈ Fixed or Proportional πΈ
In most cases, the fact that a font is fixed width or proportional is of no great interest to the user. But some applications require a fixed width font β like terminal emulators β and most people find that proportional fonts look better. The Font selector allows users to limit the font choices to fixed width or proportional, or to allow both. π«Ά
β¨ Font Scaling β¨
The font scaling technology that is available in X11R5 uses bitmap scaling which, although useful in some cases, generally results in very ugly fonts. π We noticed that users often wanted to know which fonts are scaled and which ones exist as hand crafted bitmaps. To remove the scaled fonts from the list of choices, toggle the "Use Font Scaling" button off. This value is resource controllable and defaults to on, which uses font scaling.
π Encoding π
The programmer can specify which encidings are valid selctions. These encoding choices appear in an option menu. The list of font choices is restricted to those which use the current selected coding.
π XLFD Name Display π
Clicking the Show toggle displays the current font's XLFD name is shown at the bottom of the font selector.
β Normal Resources β
Here's the whole roster, bestie β every name, every class, every type, every initial value. Nothing skipped, iykyk. π
All resource names begin with XmN and all resource class names begin with XmC.
100DPIstringβ class100DPIStringβ typeXmStringβ initial value"100 dpi"75DPIstringβ class75DPIStringβ typeXmStringβ initial value"75 dpi"anyLowerStringβ classAnyLowerStringβ typeXmStringβ initial value"any"anyStringβ classAnyStringβ typeXmStringβ initial value"Any"boldStringβ classBoldStringβ typeXmStringβ initial value"Bold"bothStringβ classBothStringβ typeXmStringβ initial value"Both"currentFontβ classStringβ typeStringβ initial valueNULLdefaultEncodingStringβ classDefaultEncodingStringβ typeStringβ initial value"iso8859-1"encodingListβ classEncodingListβ typeStringTableβ initial value"iso8859-1"encodingStringβ classEncodingStringβ typeXmStringβ initial value"Encoding"familyStringβ classBothStringβ typeXmStringβ initial value"Family"italicStringβ classItalicStringβ typeXmStringβ initial value"Italic"marginHeightβ classMarginβ typeDimensionβ initial value0monoSpaceStringβ classMonoSpaceStringβ typeXmStringβ initial value"Fixed Width Fonts"optionStringβ classOptionStringβ typeXmStringβ initial value"Options ..."otherStringβ classOtherStringβ typeXmStringβ initial value"Other Fonts"propSpaceStringβ classPropSpaceStringβ typeXmStringβ initial value"Proportional Fonts"sampleTextβ classSampleTextβ typeXmStringβ initial value"abcdef..."scalingStringβ classScalingStringβ typeXmStringβ initial value"Use Font Scaling"showFontNameβ classShowFontNameβ typeBooleanβ initial valueFalseshowNameStringβ classShowNameStringβ typeXmStringβ initial value"Show Font Name"sizeStringβ classSizeStringβ typeXmSringβ initial value"Size"spacingβ classSpacingβ typeDimensionβ initial value2textRowsβ classTextRowsβ typeDimensionβ initial value8useScalingβ classBooleanβ typeBooleanβ initial valueTruevalueChangedCallbackβ classCallbackβ typeXtCallbackListβ initial valueNULLxlfdStringβ classXlfdStringβ typeXmStringβ initial value"Xlfd Fonts"
π 100DPSString π
The label for the 100 DPI radio button.
πΈ 75DPSString πΈ
The label for the 75 DPI radio button.
π¦ anyLowerString π¦
The label for the any button.
β anyString β
The label for the Any button.
π boldString π
The label for the Bold toggle button.
π bothString π
The labels for the Both radio buttons controlling both the dpi and width of the fonts displayed. The same resource is used to ensure consistent labels.
π₯ currentFont π₯
This resource provides the main application input and output to the font selector. If the programmer sets the value at creation time or with XtSetValues, then the currently displayed family, size, bold and italic will be changed to correspond to the values shown in the current font. Otherwise, the name of the font will be shown. The Font Selector's mode will be set to correspond to the type of font passed.
Note:currentFontmust contain 14 hyphens (-) to be considered an XLFD font. This resource is also used to retrieve the font the user has selected from the font selector. The value returned is only valid until the next timeXtGetValuesis called on this instance of the font selector widget. π
β¨ defaultEncodingString β¨
This resource is the default selection from the Encoding options menu.
π§ encodingList π§
This resource is the list of encodings available from the FontSelector Encoding options menu.
π encodingString π
This resource is the default selection from the Encoding options menu.
π familyString π
This resource is the default selection from the Family options menu.
π isoFontsOnly π
This resource controls and maintains the state of the iso8859-1 fonts only toggle button.
π
italicString π
This resource is the default selection from the Italic toggle button.
π«Ά marginHeight π«Ά
The margin height for all subwidgets of the Font Selector.
πΈ monoSpaceString πΈ
The label of the Fixed Width Fonts radio button.
β optionString β
The label for the Options... push button.
π¦ otherString π¦
The label for the Other Fonts radio button.
π propSpaceString π
The label for the Proportional Fonts radio button.
π sampleText π
The string which appears in the sample text area.
π₯ scalingString π₯
The label for the Use Font Scaling toggle button.
β¨ showFontName β¨
This boolean resource controls and maintains the state of Show Font Name toggle button.
π§ showNameString π§
The label of the Show Font Name toggle button.
π sizeString π
The label for the Size option menu.
π spacing π
The space between the toggle indicator and the toggle label.
π textRows π
This resource controls the number of rows that are shown in the text widget that displays sample text in the currently selected font. Since this is a scrolled text widget it will never dynamically change size, regardless of the font displayed. Unless the initial font is large, this value should be at least 4, or the user interaction may be poor. π
π
useScaling π
This resource controls and maintains the state of the Use Font Scaling toggle button.
π«Ά valueChangedCallback π«Ά
The list of callbacks called when the XmNcurrentFont value is changed.
πΈ xlfdString πΈ
The label for the Xlfd Fonts radio button.
π Convenience Routine π
XmCreateFontSelector β Widget creation convenience routine
Widget XmCreateFontSelector(
Widget parent, /* Widget id of parent for FontSelector */
String name, /* Name of the created widget */
ArgList args, /* argument list */
Cardinal num_args /* number of items in argument list */
)
πΆ Children πΆ
okay so bestie, this widget is literally a whole friend group of sub-widgets π . Just like every widget ever, most values you pass in through the argument list at creation time β or via set values β get passed down to each of this widget's children. But get values? Nope, you gotta ask each child one by one, no group chat for that. The children of the font selector are listed below. And bestie, check the docs for each child to see its own resource list, because they each have their own thing going on.
XiFontSelector<named by application>
XiPanedtopPane
XmComboBoxfamilies
< See XmComboBox for list of children >
XmSeparatorseparator
XiComboBoxsizes
< See XmComboBox for list of children >
XmSeparatorseparator
XmButtonBoxboldItalicBox
XmToggleButtonboldButton
XmToggleButtonitalicButton
XmSeparatorseparator
XmToggleButtonoptionButton
XmSeparatorseparator
XmPanedmiddlePane
XmPanedleftPane
XmButtonBoxchoiceBox
XmToggleButtonxlfdButton
XmToggleButtonotherButton
XmSeparatorseparator
XmButtonBoxresolutionBox
XmToggleButtondpi75Button
XmToggleButtondpi100Button
XmToggleButtonanyButton
XmSeparatorseparator
XmSeparatorseparator
XmButtonBoxspacingBox
XmToggleButtonproportionalButton
XmToggleButtonmonoButton
XmToggleButtonbothButton
XmSeparatorseparator
XmButtonBoxotherChoiceBox
XmToggleButtonscalingButton
XmToggleButtonisoButton
XmToggleButtonshowNameButton
XmRowColum encodingOptionMenu
XmLabelGadget OptionLabel
XmCascadeButtonGadget OptionButton
XmMenuShell menuShell
XmRowColum pulldownMenu
<dependent on XmNencoding>
XmSeparatorseparator
XmSeparatorseparator
XmButtonBoxbox
XmScrolledWindowtextSW
XmScrollBarvbar
XmTexttext
XmSeparatorseparator
XmLabelnameLabel
XmSeparatorseparator
and that's the whole squad, no cap π. Each one has its own docs, so go read them if you need the tea on resources.
π COPYRIGHT π
Copyright (c) 1992 by Integrated Computer Solutions, Inc.
periodt, that's the legal tea β.
source/version: XmFontSelector(3X) β and yeah, no date line in this part, but it's giving classic man page energy β¨π«Ά
π¦ where this page comes from
- arch rolling: openmotif 2.3.8-4 Β· LGPL-2.1-or-later
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- epel 10: motif-devel 2.3.8-2.el10_2 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- nixos 26.05: motif 2.3.8
- nixpkgs unstable: motif 2.3.8
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms