yast/yast-fonts — pull request #4 by pgajdos (2014-10-23 15:08:30+00:00)
Title: Add Test Suite and 'Subpixel Rendering' Profile

Primarily, this adds test suite -- 96b8655b05203842e16f76efd4c64bfbea2f172c plus implemented suggestions by Josef Reidinger and Martin Vidner and more or less important improvements meet by chance.

Subpixel-rendering profile was added and user is warned in case subpixel rendering is requested but FreeType2 without subpixel rendering support is installed. This coerces adding FreeType2 library binding to be able to ensure that installed library has not subpixel rendering compiled in.

Resolved small usability problems:
1. Module doesn't crash during read when some of PREFER_*_FAMILIES is not set in sysconfig file (issue #2).
2. Module uses values from 'Default' profile when some value do not exist in the sysconfig file.
3. Module doesn't raise error when non-root user is attempting to run fonts-config. Instead, immediately after clicking 'Ok', error popup is shown and whole saving & applying setting section is stoped.

There is last item left unimplemented from suggestions from the last pull request: FontsConfigState feels like a structure, but it is defined as object. It is because of its nature .. it is just an image of /etc/sysconfig/fonts-config, i. e. container of variable values. It can be as whole read from or written in the sysconfig file or loaded, again as a whole, from one of the preset. There's no any aditional logic, so accessors for individual values used by GUI elements should not do any harm, as far as I can see. Of course, when some problem arises, I'll consider the rewrite to a structure immediately.