Commit Graph

9 Commits

Author SHA1 Message Date
Akira TAGOH 528b17b283 Drop elements with its namespace from conf
The translation related elements are now provided by separate files
fontconfig.its and fontconfig.loc. we don't need to have it in conf
anymore.

Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/234
2020-05-25 10:44:05 +09:00
Nicolas Mailhot 9c46ef4aac Use an URN for DTD ID
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
2020-03-28 15:01:35 +01:00
Akira TAGOH 454923709a Change the emboldening logic again
enable emboldening when request was >= bold and font was <= medium

https://bugs.freedesktop.org/show_bug.cgi?id=106460
2018-05-11 12:14:26 +09:00
Akira TAGOH 9a0fcb948f Add the ruleset description support
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.
2017-11-07 15:24:54 +09:00
Behdad Esfahbod 9efe0689ae Adjust emboldening logic
Old logic was really bad.  If you requested weight=102 and got a medium
font (weight=100), it would still enable emboldening...

Adjust it to only embolden if request was >= bold and font was <= regular.
2017-09-20 13:13:35 -07:00
Behdad Esfahbod 52742ff86b Replace spaces with tabs in conf files 2009-06-28 13:49:09 -04:00
Behdad Esfahbod 0f11354877 Revert "[conf] Disable hinting when emboldening (#19904)" (#20599)
This reverts commit 10609af4aa.
Apparently disabling hinting can cause worse rendering with certain
fonts.  This is better handled on a per font basis.
2009-06-24 13:52:09 -04:00
Mike FABIAN 10609af4aa [conf] Disable hinting when emboldening (#19904)
Hinting will be done before Embolden in freetype2,
but in such case, Embolden will get wrong result
on some glyph contours after applying hinting.
Actually, hinting should be done after embolden, but we can't
fix it in current freetype2. So as a workaround, just turn off
hinting if we want to do embolden.
2009-02-15 13:40:23 -08:00
Keith Packard 6c5619a085 Split much of the configuration into separate files. Renumber files
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.
2006-09-09 21:32:14 -07:00