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 ...).
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
/usr/local/etc/nscde/NsCDE-Font-$NSCDE_FONT_DPI.conf
and/or in the file
$FVWM_USERDIR/NsCDE-Font-$NCDE_FONT_DPI.conf
. User's
$FVWM_USERDIR/NsCDE-Font-$NSCDE_FONT_DPI.conf
is a symlink to either
/usr/local/share/nscde/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 /usr/local/share/nscde/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 leaving Use Predefined Font Set mode
before saving defined scheme as $FVWM_USERDIR/fontsets/SomeName.fontset
and linking this
name to $FVWM_USERDIR/NsCDE-Font-$NSCDE_FONT_DPI.conf
. List of fontsets on the left GUI list is
inactive until button Use Predefined Font Set is not turned on, then Font Style Manager
operates with sets of fonts, and not in compose mode with individual fonts. In this mode, right GUI list contains
information about fontset and previewed fonts when they are selected with mouse or keyboard. This information can
contain additional bottom line (Not available) if font from the fontset does not exist under
this name on the system. If such fontset is loaded and saved anyway, system's XFT subsystem will select nearest
match or the default font instead of non-existing one.
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 /usr/local/share/nscde/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. Further, user will be asked to immediately restart FVWM, for changes to be
applied from all parts from the new configuration.
Key Bindings:
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