From 414f720281b416736b92913f4bcbceac1a781cde Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 28 Feb 2005 18:56:15 +0000 Subject: [PATCH] Create prototype /etc/fonts/conf.d directory with a few sample configuration files. Deprecate use of local.conf for local customizations in favor of this directory based scheme which is more easily integrated into installation systems. Tag FC_EMBOLDEN as a boolean variable --- ChangeLog | 18 ++++++++++++++++++ Makefile.am | 24 ++---------------------- conf.d/Makefile.am | 34 ++++++++++++++++++++++++++++++++++ conf.d/README | 8 ++++++++ conf.d/no-bitmaps.conf | 13 +++++++++++++ conf.d/sub-pixel.conf | 12 ++++++++++++ conf.d/yes-bitmaps.conf | 13 +++++++++++++ configure.in | 1 + src/fcname.c | 1 + 9 files changed, 102 insertions(+), 22 deletions(-) create mode 100644 conf.d/Makefile.am create mode 100644 conf.d/README create mode 100644 conf.d/no-bitmaps.conf create mode 100644 conf.d/sub-pixel.conf create mode 100644 conf.d/yes-bitmaps.conf diff --git a/ChangeLog b/ChangeLog index a67f619..5447b40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2005-02-28 Keith Packard + + * Makefile.am: + * conf.d/Makefile.am: + * conf.d/README: + * conf.d/no-bitmaps.conf: + * conf.d/sub-pixel.conf: + * conf.d/yes-bitmaps.conf: + * configure.in: + Create prototype /etc/fonts/conf.d directory with a few + sample configuration files. + Deprecate use of local.conf for local customizations in favor of + this directory based scheme which is more easily integrated into + installation systems. + + * src/fcname.c: + Tag FC_EMBOLDEN as a boolean variable + 2005-02-10 Keith Packard reviewed by: pborelli@katamail.com diff --git a/Makefile.am b/Makefile.am index 16d2f21..44a506d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,13 +22,13 @@ # PERFORMANCE OF THIS SOFTWARE. DOCSRC=@DOCSRC@ -SUBDIRS=fontconfig fc-case fc-lang fc-glyphname src fc-cache fc-list fc-match $(DOCSRC) test +SUBDIRS=fontconfig fc-case fc-lang fc-glyphname src \ + fc-cache fc-list fc-match conf.d $(DOCSRC) test EXTRA_DIST = \ fontconfig.pc.in \ fonts.conf.in \ fonts.dtd \ - local.conf \ fontconfig.spec.in \ fontconfig.spec \ fontconfig-zip.in @@ -58,15 +58,6 @@ install-data-local: echo " $(INSTALL_DATA) fonts.conf $(DESTDIR)$(configdir)/fonts.conf"; \ $(INSTALL_DATA) fonts.conf $(DESTDIR)$(configdir)/fonts.conf; \ fi; fi - if [ -f $(DESTDIR)$(configdir)/local.conf ]; then \ - echo "not overwriting existing $(DESTDIR)$(configdir)/local.conf"; \ - else if [ -f $(srcdir)/local.conf ]; then \ - echo " $(INSTALL_DATA) $(srcdir)/local.conf $(DESTDIR)$(configdir)/local.conf"; \ - $(INSTALL_DATA) $(srcdir)/local.conf $(DESTDIR)$(configdir)/local.conf; \ - else if [ -f local.conf ]; then \ - echo " $(INSTALL_DATA) local.conf $(DESTDIR)$(configdir)/local.conf"; \ - $(INSTALL_DATA) local.conf $(DESTDIR)$(configdir)/local.conf; \ - fi; fi; fi if $(RUN_FC_CACHE_TEST); then \ echo " fc-cache/fc-cache -f -v"; \ fc-cache/fc-cache -f -v; \ @@ -90,14 +81,3 @@ uninstall-local: rm -f $(DESTDIR)$(configdir)/fonts.conf; \ fi; \ fi; fi - if [ -f $(srcdir)/local.conf ]; then \ - if cmp -s $(srcdir)/local.conf $(DESTDIR)$(configdir)/local.conf; then \ - echo " uninstall standard $(DESTDIR)$(configdir)/local.conf"; \ - rm -f $(DESTDIR)$(configdir)/local.conf; \ - fi; \ - else if [ -f local.conf ]; then \ - if cmp -s local.conf $(DESTDIR)$(configdir)/local.conf; then \ - echo " uninstall standard $(DESTDIR)$(configdir)/local.conf"; \ - rm -f $(DESTDIR)$(configdir)/local.conf; \ - fi; \ - fi; fi diff --git a/conf.d/Makefile.am b/conf.d/Makefile.am new file mode 100644 index 0000000..410a418 --- /dev/null +++ b/conf.d/Makefile.am @@ -0,0 +1,34 @@ +# +# $Id$ +# +# Copyright © 2005 Keith Packard +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of Keith Packard not be used in +# advertising or publicity pertaining to distribution of the software without +# specific, written prior permission. Keith Packard makes no +# representations about the suitability of this software for any purpose. It +# is provided "as is" without express or implied warranty. +# +# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR +# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. + +CONF_FILES = \ + no-bitmaps.conf \ + yes-bitmaps.conf \ + sub-pixel.conf + +EXTRA_DIST = $(CONF_FILES) + +configdir=$(CONFDIR) +confddir=$(configdir)/conf.d + +confd_DATA=$(CONF_FILES) diff --git a/conf.d/README b/conf.d/README new file mode 100644 index 0000000..7e6cd2c --- /dev/null +++ b/conf.d/README @@ -0,0 +1,8 @@ +conf.d/README + +Each file in this directory is a fontconfig configuration file. Fontconfig +scans this directory, loading all files of the form [0-9][0-9]*, so if you +want to use any of these options, link them to a name of that form. E.g. + + $ ln -s no-bitmaps.conf 10no-bitmaps.conf + diff --git a/conf.d/no-bitmaps.conf b/conf.d/no-bitmaps.conf new file mode 100644 index 0000000..e8fb6a9 --- /dev/null +++ b/conf.d/no-bitmaps.conf @@ -0,0 +1,13 @@ + + + + + + + + + false + + + + diff --git a/conf.d/sub-pixel.conf b/conf.d/sub-pixel.conf new file mode 100644 index 0000000..f3933c8 --- /dev/null +++ b/conf.d/sub-pixel.conf @@ -0,0 +1,12 @@ + + + + + + + + unknown + + rgb + + diff --git a/conf.d/yes-bitmaps.conf b/conf.d/yes-bitmaps.conf new file mode 100644 index 0000000..c539c70 --- /dev/null +++ b/conf.d/yes-bitmaps.conf @@ -0,0 +1,13 @@ + + + + + + + + + false + + + + diff --git a/configure.in b/configure.in index 22d8bc6..6d9ca65 100644 --- a/configure.in +++ b/configure.in @@ -467,6 +467,7 @@ fc-glyphname/Makefile fc-case/Makefile src/Makefile src/fontconfig.def +conf.d/Makefile fc-cache/Makefile fc-list/Makefile fc-match/Makefile diff --git a/src/fcname.c b/src/fcname.c index 1cce324..3b9454d 100644 --- a/src/fcname.c +++ b/src/fcname.c @@ -69,6 +69,7 @@ static const FcObjectType _FcBaseObjectTypes[] = { { FC_FONTVERSION, FcTypeInteger }, { FC_CAPABILITY, FcTypeString }, { FC_FONTFORMAT, FcTypeString }, + { FC_EMBOLDEN, FcTypeBool }, }; #define NUM_OBJECT_TYPES (sizeof _FcBaseObjectTypes / sizeof _FcBaseObjectTypes[0]) -- 2.39.5