XML tools interpret “fonts.dtd” as a relative path.
Unfortunately, that can not work now that the configuration is spread over
multiple system-dependant directories, without a common relative path to this
file. And, an absolute path can not be defined in a system-independant way.
System independance is a requirement to share config files between systems.
Therefore, replace the broken relative path by a formal URN, that will work the
same way on all systems, without network access.
This makes the DTD registerable with commands like:
$ xmlcatalog --noout --add system \
"urn:fontconfig:fonts.dtd" \
"file:///usr/share/xml/fontconfig/fonts.dtd" \
/etc/xml/catalog
That enables easy config file checking:
$ xmllint --loaddtd ${config_file} >/dev/null
The generic family of 'system-ui' name is being proposed in a draft of next CSS Fonts.
This would be nice to support in fontconfig too.
https://www.w3.org/TR/css-fonts-4/
Trying to address what these configuration files really do.
This change allows to see the short description that mention
the purpose of the content in the config file and obtain
them through API.
This change also encourage one who want to make some UI for
the user-specific configuration management. it is the main
purpose of this change for me though.
Aside from that, I've also made programs translatable. so
we see more dependencies on the build time for gettext,
and itstool to generate PO from xml.
Allows reading configuration files, fonts and cache files from
the directories where the XDG Base Directory Specification defines.
the old directories are still in the configuration files for
the backward compatibility.
Add configure options to set the directory to be installed:
--with-templatedir for the configuration files a.k.a.
/etc/fonts/conf.avail
--with-baseconfigdir for fonts.conf etc a.k.a. /etc/fonts
--with-configdir for the active configuration files a.k.a.
/etc/fonts/conf.d
--with-xmldir for fonts.dtd etc
and the default path for templatedir is changed to
${datadir}/fontconfig/conf.avail
Most of the remaining elements in fonts.conf have been moved to separate
files. The numbering scheme for conf.d files has been documented in the
README and the files have been renumbered. Config files have been
validated against the DTD and a few minor errors fixed.
The FreeSans, FreeSerif and FreeMono fonts cover a large number of
languages, but are of generally poor quality. Moving these after fonts which
cover specific languages but which have higher quality glyphs should improve
font selection.
DejaVu is a modified version of Bitstream Vera that covers significantly
more languages, but does so with spotty quality, lacking hinting for many
glyphs, especially for the synthesized serif oblique face. Use Bitstream
Vera (where installed).
Previous policy was to attempt to update the cache in place and bail if that
didn't work. Now, search for the first writable directory and place the
cache file there instead. Furthermore, on startup, search directory list for
valid cache files instead of bailing if the first found cache file wasn't
valid.
override this in ~/.fonts.conf
Updated translations
Destroy font configuration on exit to help valgrind
Use own transcoding routines in preference to iconv which appears to have
leaks in some translators. Call iconv_close after using iconv (oops).
Prefer unicode encoding of Euro char as some fonts mis-encode Euro in other
ones.
Must fetch bitmap glyphs to get width values to check for
monospace/dual-width fonts.
Add new helper program 'fc-case' to construct case folding tables from
standard Unicode CaseFolding.txt file
Re-implement case insensitive functions with Unicode aware versions
(including full case folding mappings)
multi-arch installs. Now that all X fonts are included without
prejudice, the chances of the date being at all interesting are rather
limited. Bug #415.
Add copyright and license
wherever the X fonts are located).
Document new <include>directory-name</include> semantics
add <include ignore_missing="yes">conf.d</include>
Add selectfont to ignore bitmap fonts, add comment for selectfont which
accepts bitmap fonts.
Allow <include> configuration elements to reference directories. Parse and
load all files of the form [0-9]* in sorted order.