Font management is the area where NsCDE and CDE are probably most different. Font Style Manager is completely NsCDE tool to set fonts for usage inside FVWM and external toolkits integration (X Resources/Motif, GTK2, GTK3, Qt4, Qt5, Qt6 ...).
NsCDE defines 15 fonts. Five groups with three members:
Normal Small
Normal Medium
Normal Large
Bold Small
Bold Medium
Bold Large
Italic Small
Italic Medium
Italic Large
Monospaced Small
Monospaced Medium
Monospaced Large
Monospaced Bold Small
Monospaced Bold Medium
Monospaced Bold Large
This fonts are defined as FVWM infostore variables in the file
$NSCDE_DATADIR/fvwm/Font-$NSCDE_FONT_DPI.fvwmconf
and/or in the file
$FVWM_USERDIR/NsCDE-Font-$NCDE_FONT_DPI.fvwmgen
. User's
$FVWM_USERDIR/NsCDE-Font-$NSCDE_FONT_DPI.fvwmgen
is a symlink to either
$NSCDE_DATADIR/fontsets/SomeName.fontset
or to
$FVWM_USERDIR/fontsets/SomeName.fontset
.
Further, they are defined as CPP macros in
$FVWM_USERDIR/Xdefaults.fontdefs
which is included in
$FVWM_USERDIR/Xdefaults
where it is used. GTK2 and GTK3 are also getting default font (Normal Medium) in
their configurations if integration option has been selected in Font Style Manager.
X resources and GTK are not refreshed by default, their checkboxes can be unselected
if some of this widget integrations is not desirable by the user.
The Font Style Manager itself consists of fontsets and fonts. Fontsets are
named complete sets of five groups of three members of fonts defined above.
Fontsets are stored in $NSCDE_DATADIR/fontsets
and in
$FVWM_USERDIR/fontsets
. If font set is selected in
Font Style Manager, 15 fonts from the set are loaded into preview lists of the application and can be
immediately applied or further customized by switching from Choose Existing Fontset mode
to Create a New Fontset before saving defined scheme as
$FVWM_USERDIR/fontsets/SomeNewName.fontset
and linking this name to
$FVWM_USERDIR/NsCDE-Font-${NSCDE_FONT_DPI}dpi.fvwmgen
. List of fontsets on the left GUI list is
inactive until popup menu option Choose Existing Fontset is not turned on, then Font Style Manager
operates with existing ready made sets of fonts, and not in create/compose mode, that is, with individual fonts.
In fontset mode, right GUI list contains information about fontset and fonts are previewed below, and can be selected
with mouse or keyboard for text changing to see different letters. This information on the right GUI list can
contain additional bottom line (Not available) if font from the fontset does not exist under
this name or XFT alias on the system. If such fontset is loaded and saved anyway, system's XFT subsystem will select
nearest font match or the default font instead of non-existing one, depending on it's configuration.
By default, manual font selection contains list of XFT fonts found on the system in the left GUI list and their styles (regular, bold, italic ...) on the right GUI list. list.
DPI value for fonts in NsCDE is by default defined to be 96 in $FVWM_USERDIR/Xdefaults.fontdefs
as "Xft.dpi".
This is to accomplish reasonable defaults for all widgets and programs which use them, but if overriden, existing
user custom fontset for 96 DPI will not be considered anymore. System default from that approximate DPI range will
be used until new custom fontset is created, where NSCDE_FONT_DPI
will not be 96 anymore.
Main font selectors are:
Font Size Group
Font Style Group
Set Size (available only in manual selection mode)
First popup menu loads 5 fonts from one of the 3 sets: small, medium or large. Second popup determines on which font current selection is working: normal, bold, italic, mono or mono bold (clicking on font preview itself has the same function) and third popup menu sets font size. When Font Style Manager is started, current fontset is loaded and previews are populated with that fonts. Default mode of operation will be switched to manual font selection for customizations into the new fontset.
Button $NSCDE_DATADIR/fontsets/DejaVuSerif.fontset
which can
then be saved as a choice or further customized into the new fontset. Bottom half of the
Font Style Manager contains preview for all fonts from the one of the three selected size sets.
Checkboxes Refresh GTK2/GTK3, and Refresh X Resources" are integrating font selection with popular widgets by providing normal medium font and it's size to their configuration files. Qt4 and Qt5 should automatically pick Gtk fonts if Qt "GTK2" font engine is active in their configurations. If not, qtconfig-qt4 and qt5ct applications can be started and some minor changes done and undone - enough for Apply/Save to take effect, and then font from Gtk will be loaded for sure. Checkbox Run User Script will attempt to run $FVWM_USERDIR/libexec/fontmgr.local if it exists, with argument of the new config file. This is intended for user's customizations which are currently beyond NsCDE's scope of program and widget integrations.
$FVWM_USERDIR
. If manual modification
has taken place, user will be asked to name a new fontset with the popup dialog. Name "custom" is the default proposal
in the dialog, but it should be changed, because this name is predestinated to be rewritten on the next
Font Style Manager saving action. Most of the visual changes should take effect immediately. GTK2/GTK3 programs
included if xsettingsd(1) daemon is active and used. Some programs will need to be reopened for new font to take
effect.
Key Bindings:
Ctrl+Return: Perform a change. Like if was pressed.
Ctrl+Q: Quits Font Style Manager.
Sun Help and F1: Displays this help text.
Up (Arrow Up): Selects prior font or fontset on the list
Down (Arrow Down): Selects next font or fontset on the list
Prior (Page Up): Selects preview box from the bottom to the top and cycles back to the bottom again
Next (Page Down): Selects preview box from the top to the botttom and cycles back to the top again
Ctrl+S: Loads small group of fonts on the preview fileds
Ctrl+M: Loads medium group of fonts on the preview fileds
Ctrl+L: Loads large group of fonts on the preview fileds
Ctrl+Plus: In manual selection mode, increases font size for selected font
Ctrl+Minus: In manual selection mode, decreases font size for selected font
Ctrl+Equal: Sets font size to default start point size for current font size group previewed
Ctrl+F: Changes mode of operation between prefedined fontsets and manual font selection mode
A Font Style Manager part.
Since NsCDE 2.3, the most important new feature in Font Style Manager are integration options. This are:
X resources in $FVWM_USERDIR/Xdefaults
(default)
GTK2 (default)
GTK3 (default)
Qt4 (default)
Qt5 (default)
Qt6 (depends)
User's $FVWM_USERDIR/libexec/fontmgr.local
script if exists.
The last integration (local) is used to integrate what default widget integrations cannot reach. For example, custom font in the favourite terminal emulator window.
If nscde_use_xsettingsd
is set to 1 in the $FVWM_USERDIR/NsCDE.conf
after applying new font theme, user's X Settings in $FVWM_USERDIR/Xsettingsd.conf
will
be adjusted and xsettingsd(1) daemon restarted for settings in GTK and Qt applications to be applied immediately.
This option can be enabled by editing NsCDE.conf or during initial setup. NsCDE starts xsettingsd
daemon with "-c $FVWM_USERDIR/Xsettingsd.conf" parameter. This file must be present if it was not
installed by the initial setup procedure.
This Helper dialog serves to select graphical widgets which will be integrated with NsCDE. As said above,
NsCDE provides it's own X resources for Athena and Motif programs, theme engines for GTK2, GTK3, Qt4, Qt5
and Qt6, and also extension to various single programs with
$[FVWM_USERDIR]/libexec/fontmgr.local
like calculators, terminal emulators, etc.
Default selection assumes average modern Linux or similar system with GTK2, GTK3, Qt4 and Qt5 present.
However, it is on user to decide here what of all this to run by selecting or unselecting
checkboxes of the particular integration point.
Selected integrations in this dialog will be saved for the next time. This means that NsCDE will respect user's choice next time Font Style Manager is used without selecting or unselecting this options again. This also means that any non-working integration with some widget set should be inspected by opening this dialog while using Font Style Manager.
Key Bindings:
Ctrl+Return: Selects OK.
Escape: Quits Dialog.
Sun Help and F1: Displays this help text.