4.6. Font Style Manager

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:

This fonts are defined as FVWM infostore variables in the file $NSCDE_ROOT/config/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 $NSCDE_ROOT/share/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_ROOT/share/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:

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 Default loads default $NSCDE_ROOT/share/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.

Save button will save fontset choice, or generated selection as a new fontset in manual selection mode, make link to it in $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: