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
This commit is contained in:
Keith Packard 2005-02-28 18:56:15 +00:00
parent 47b49bf14b
commit 414f720281
9 changed files with 102 additions and 22 deletions

View File

@ -1,3 +1,21 @@
2005-02-28 Keith Packard <keithp@keithp.com>
* 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 <keithp@keithp.com>
reviewed by: pborelli@katamail.com

View File

@ -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

34
conf.d/Makefile.am Normal file
View File

@ -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)

8
conf.d/README Normal file
View File

@ -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

13
conf.d/no-bitmaps.conf Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/conf.d/no-bitmaps.conf -->
<fontconfig>
<!-- Reject bitmap fonts -->
<selectfont>
<rejectfont>
<pattern>
<patelt name="scalable"><bool>false</bool></patelt>
</pattern>
</rejectfont>
</selectfont>
</fontconfig>

12
conf.d/sub-pixel.conf Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- conf.d/sub-pixel.conf -->
<fontconfig>
<!-- Enable sub-pixel rendering -->
<match target="font">
<test qual="all" name="rgba">
<const>unknown</const>
</test>
<edit name="rgba" mode="assign"><const>rgb</const></edit>
</match>
</fontconfig>

13
conf.d/yes-bitmaps.conf Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- conf.d/yes-bitmaps.conf -->
<fontconfig>
<!-- Accept bitmap fonts -->
<selectfont>
<acceptfont>
<pattern>
<patelt name="scalable"><bool>false</bool></patelt>
</pattern>
</acceptfont>
</selectfont>
</fontconfig>

View File

@ -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

View File

@ -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])