Font standards

E16 themes have many choices when it comes to font setup.

X Font (normal/multibyte)


In order for a theme to be functional on as many distributions as possible, which choice would be the most effective? Should we limit the themes here to a standard set (possibly UTF8) for the best support? If so which ones would be good candidates?

New font configuration search scheme

In order to prepare for general theme font support I have made some changes to the font alias configuration file search scheme.

It may seem somewhat elaborate but I'm trying to maintain backward compatibility and not to change existing ("deliberate") user configuration choices.

theme.use_theme_font_cfg (boolean, default "0", i.e. false)
theme.use_alt_font_cfg (boolean, default "0")
theme.font_cfg (string, default not set)

Beware that options may have been inherited from a previous e16 version where the default was different, as previously described.

The search now goes as follows (assuming standard installation paths):

# If theme.use_alt_font_cfg and Conf.theme.font_cfg is set, e.g. to myfont.cfg
/usr/share/e16/config/myfont.cfg # Will normally not exist

# If theme.use_theme_font_cfg is set
~/.e16/fonts.theme.cfg # Should normally not exist
/usr/share/e16/config/fonts.theme.cfg # Not installed by e16

# Always (for backward compatibility)
/usr/share/e16/config/fonts.cfg # Not installed by e16

# If compiled with pango
/usr/share/e16/config/fonts.pango.cfg # Installed by e16

# If compiled with xft
/usr/share/e16/config/fonts.xft.cfg # Installed by e16

# Always (fallback/backward compatibility)
/usr/share/e16/config/fonts.cfg # Not installed by e16

Thus, in a new default setup we find
/usr/share/e16/config/fonts.pango.cfg # If compiled with pango
/usr/share/e16/config/fonts.xft.cfg # If compiled with xft
Hmm.. nothing if neither ... might have to fix that. This will ultimately result in using the XLFD fixed font.

If theme.use_theme_font_cfg is set we should get
if it exists or fall back to default.

This way themes can specify e.g. the original theme font in fonts.theme.cfg, and optionally provide fonts.pango/xft.cfg if it has better settings taking specific theme characteristics into account (e.g. particularly thin borders).

This is an initial attempt to add "general theme font support". I'm not entirely convinced that there are no flaws.
If you have alternative suggestions feel free to share them :)