]> git.wh0rd.org - fontconfig.git/commitdiff
Various config changes plus a couple of optimizations from Owen
authorKeith Packard <keithp@keithp.com>
Mon, 19 Aug 2002 19:32:05 +0000 (19:32 +0000)
committerKeith Packard <keithp@keithp.com>
Mon, 19 Aug 2002 19:32:05 +0000 (19:32 +0000)
24 files changed:
ChangeLog
config.h.in
config/Makedefs.in
configure.in
fc-cache/Imakefile
fc-lang/Imakefile
fc-lang/ja.orth
fc-lang/ko.orth
fc-lang/zh_cn.orth
fc-lang/zh_sg.orth
fc-list/Imakefile
fontconfig/fcprivate.h
fontconfig/fontconfig.h
fonts.conf.in
src/Imakefile
src/fccache.c
src/fccfg.c
src/fcdbg.c
src/fclist.c
src/fcmatch.c
src/fcname.c
src/fcpat.c
src/fcxml.c
src/fontconfig.man

index 5decb0d498f547f5eff6fa91388bb4cc09a64f05..b12772c5d41a9e11a4726d6d1ed45724eee4b069 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+Mon Aug 19 11:57:27 PDT 2002
+       + Fix autoconf files to pass FONTCONFIG_PATH on
+         compile line so that ${prefix} gets substituted
+         correctly.
+
+       + Use getc_unlocked/putc_unlocked on systems that
+         provide them to avoid damage done to stdio by posix
+
+       + Eliminate FC_PATTERN and FcTypePattern in favor of
+         an extended api for FcConfigSubstitute which takes
+         both the font and the pattern.
+
+       + Add 'sans serif' alias for 'sans-serif' as some apps
+         can't handle hyphens in family names
+
+       + Eliminate pretense of support for libxml2
+
+       + Comment origins of Han orthographies
+
 Tue Jul 30 18:37:09 PDT 2002   keithp
 
        + Add binding property to edit element so that strong
 Tue Jul 30 18:37:09 PDT 2002   keithp
 
        + Add binding property to edit element so that strong
index 9e226b0323819a796474d6a924f677dae624b361..ee9c8907007cedbf15ae7117fd92f7c46e17cd13 100644 (file)
 /* Define to 1 if you have the `vprintf' function. */
 #undef HAVE_VPRINTF
 
 /* Define to 1 if you have the `vprintf' function. */
 #undef HAVE_VPRINTF
 
-/* Use libxml2 library for xml parsing */
-#undef HAVE_XML2
-
-/* Define to 1 if you have the `xmlInitParser' function. */
-#undef HAVE_XMLINITPARSER
-
 /* Define to 1 if you have the `XML_ParserCreate' function. */
 #undef HAVE_XML_PARSERCREATE
 
 /* Define to 1 if you have the `XML_ParserCreate' function. */
 #undef HAVE_XML_PARSERCREATE
 
 
 /* Define to `int' if <sys/types.h> does not define. */
 #undef pid_t
 
 /* Define to `int' if <sys/types.h> does not define. */
 #undef pid_t
-
-/* Define to the directory containing font configuration files */
-#undef FONTCONFIG_PATH
index f3603f77d0952e848f7e1fb2ea7a96a0ac809e4d..82582cfd9781b3338dda13a9f0aa40cc1bae9296 100644 (file)
@@ -1,5 +1,5 @@
 #
 #
-# $XFree86: xc/lib/fontconfig/config/Makedefs.in,v 1.2 2002/05/21 17:48:15 keithp Exp $
+# $XFree86: xc/lib/fontconfig/config/Makedefs.in,v 1.3 2002/08/01 15:57:26 keithp Exp $
 #
 # Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
 #
 #
 # Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
 #
@@ -32,19 +32,12 @@ bindir=@bindir@
 datadir=@datadir@
 includedir=@includedir@
 sysconfdir=@sysconfdir@
 datadir=@datadir@
 includedir=@includedir@
 sysconfdir=@sysconfdir@
-
-CDEBUGFLAGS=@CFLAGS@
-CPPFLAGS=@CPPFLAGS@
-DEFS=@DEFS@
+confdir=@confdir@
 
 DSO_LDOPTS=@DSO_LDOPTS@
 DSO_CFLAGS=@DSO_CFLAGS@
 DSO_PIC_CFLAGS=@DSO_PIC_CFLAGS@
 
 
 DSO_LDOPTS=@DSO_LDOPTS@
 DSO_CFLAGS=@DSO_CFLAGS@
 DSO_PIC_CFLAGS=@DSO_PIC_CFLAGS@
 
-INCLUDES=-I$(TOPDIR) -I$(srcdir)
-
-CFLAGS=$(CDEBUGFLAGS) $(INCLUDES) $(DEFS) $(CPPFLAGS)
-
 INSTALL=@INSTALL@
 INSTALL_PROGRAM=@INSTALL_PROGRAM@
 INSTALL_SCRIPT=@INSTALL_SCRIPT@
 INSTALL=@INSTALL@
 INSTALL_PROGRAM=@INSTALL_PROGRAM@
 INSTALL_SCRIPT=@INSTALL_SCRIPT@
@@ -52,10 +45,6 @@ INSTALL_DATA=@INSTALL_DATA@
 MKSHLIB=@MKSHLIB@
 LN_S=@LN_S@
 
 MKSHLIB=@MKSHLIB@
 LN_S=@LN_S@
 
-X_FONT_DIR=@X_FONT_DIR@
-FC_DEFAULT_FONTS=@FC_DEFAULT_FONTS@
-FONTCONFIG_PATH=@FONTCONFIG_PATH@
-
 # shared libraries
 LIBDIR=$(libdir)
 # programs
 # shared libraries
 LIBDIR=$(libdir)
 # programs
@@ -65,6 +54,16 @@ CONFDIR=@CONFDIR@
 # include files
 INCLUDEDIR=$(includedir)/fontconfig
 
 # include files
 INCLUDEDIR=$(includedir)/fontconfig
 
+X_FONT_DIR=@X_FONT_DIR@
+FC_DEFAULT_FONTS=@FC_DEFAULT_FONTS@
+FCPATH_DEF=-DFONTCONFIG_PATH=\"$(CONFDIR)\"
+
+CDEBUGFLAGS=@CFLAGS@
+
+INCLUDES=-I$(TOPDIR) -I$(srcdir) @CPPFLAGS@
+
+CFLAGS=$(CDEBUGFLAGS) @DEFS@ $(FCPATH_DEF) $(INCLUDES)
+
 LIBBASE=libfontconfig.so
 LIBFILE=$(LIBBASE).@PACKAGE_MAJOR@.@PACKAGE_MINOR@
 LIBMAJOR=$(LIBBASE).@PACKAGE_MAJOR@
 LIBBASE=libfontconfig.so
 LIBFILE=$(LIBBASE).@PACKAGE_MAJOR@.@PACKAGE_MINOR@
 LIBMAJOR=$(LIBBASE).@PACKAGE_MAJOR@
index 325ff9a88ec234120edfcd14af4cb3aa236216f0..a3c1f75fc2d2371c8329fb5070534c0d8d1399d5 100644 (file)
@@ -1,5 +1,5 @@
 dnl
 dnl
-dnl $XFree86: xc/lib/fontconfig/configure.in,v 1.6 2002/06/07 17:55:41 keithp Exp $
+dnl $XFree86: xc/lib/fontconfig/configure.in,v 1.7 2002/08/01 15:57:25 keithp Exp $
 dnl
 dnl Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
 dnl
 dnl
 dnl Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
 dnl
@@ -23,6 +23,7 @@ dnl PERFORMANCE OF THIS SOFTWARE.
 dnl
 
 # Process this file with autoconf to produce a configure script.
 dnl
 
 # Process this file with autoconf to produce a configure script.
+
 AC_INIT(fontconfig, 1.0.1, fonts@xfree86.org)
 AC_CONFIG_AUX_DIR(config)
 AC_CONFIG_HEADER(config.h)
 AC_INIT(fontconfig, 1.0.1, fonts@xfree86.org)
 AC_CONFIG_AUX_DIR(config)
 AC_CONFIG_HEADER(config.h)
@@ -30,13 +31,11 @@ AC_CONFIG_HEADER(config.h)
 AC_ARG_WITH(freetype_includes, [  --with-freetype-includes=DIR  Use FreeType includes in DIR], freetype_includes=$withval, freetype_includes=yes)
 AC_ARG_WITH(freetype_lib,      [  --with-freetype-lib=DIR       Use FreeType library in DIR], freetype_lib=$withval, freetype_lib=yes)
 AC_ARG_WITH(freetype_config,   [  --with-freetype-config=PROG   Use FreeType configuration program PROG], freetype_config=$withval, freetype_config=yes)
 AC_ARG_WITH(freetype_includes, [  --with-freetype-includes=DIR  Use FreeType includes in DIR], freetype_includes=$withval, freetype_includes=yes)
 AC_ARG_WITH(freetype_lib,      [  --with-freetype-lib=DIR       Use FreeType library in DIR], freetype_lib=$withval, freetype_lib=yes)
 AC_ARG_WITH(freetype_config,   [  --with-freetype-config=PROG   Use FreeType configuration program PROG], freetype_config=$withval, freetype_config=yes)
-AC_ARG_WITH(expat,             [  --with-expat=DIR              Use Expat in DIR instead of xml2], expat=$withval, expat=maybe)
+AC_ARG_WITH(expat,             [  --with-expat=DIR              Use Expat in DIR], expat=$withval, expat=yes)
 AC_ARG_WITH(expat_includes,    [  --with-expat-includes=DIR     Use Expat includes in DIR], expat_includes=$withval, expat_includes=yes)
 AC_ARG_WITH(expat_lib,         [  --with-expat-lib=DIR          Use Expat library in DIR], expat_lib=$withval, expat_lib=yes)
 AC_ARG_WITH(expat_includes,    [  --with-expat-includes=DIR     Use Expat includes in DIR], expat_includes=$withval, expat_includes=yes)
 AC_ARG_WITH(expat_lib,         [  --with-expat-lib=DIR          Use Expat library in DIR], expat_lib=$withval, expat_lib=yes)
-AC_ARG_WITH(xml2,              [  --with-xml2=DIR               Use Libxml2 in DIR instead of expat], xml2=$withval, xml2=maybe)
-AC_ARG_WITH(xml2_includes,     [  --with-xml2-includes=DIR      Use Libxml2 includes in DIR], xml2_includes=$withval, xml2_includes=yes)
-AC_ARG_WITH(xml2_lib,          [  --with-xml2-lib=DIR           Use Libxml2 library in DIR], xml2_lib=$withval, xml2_lib=yes)
 AC_ARG_WITH(default_fonts,     [  --with-default-fonts=DIR      Use fonts from DIR when config is busted], defaultfonts="$withval", default_fonts=yes)
 AC_ARG_WITH(default_fonts,     [  --with-default-fonts=DIR      Use fonts from DIR when config is busted], defaultfonts="$withval", default_fonts=yes)
+AC_ARG_WITH(confdir,           [  --with-confdir=DIR            Use DIR to store configuration files (default /etc/fonts)], confdir="$withval", confdir=yes)
 
 # Checks for programs.
 AC_PROG_CC
 
 # Checks for programs.
 AC_PROG_CC
@@ -210,39 +209,21 @@ AC_SUBST(FC_DEFAULT_FONTS)
 # Set CONFDIR and FONTCONFIG_PATH
 #
 
 # Set CONFDIR and FONTCONFIG_PATH
 #
 
-CONFDIR="$sysconfdir/fonts"
-AC_DEFINE_UNQUOTED(CONFDIR, "$CONFDIR")
-AC_SUBST(CONFDIR)
-
-FONTCONFIG_PATH="$CONFDIR"
-AC_DEFINE_UNQUOTED(FONTCONFIG_PATH, "$CONFDIR")
-AC_SUBST(FONTCONFIG_PATH)
-
-#
-# Check expat/libxml2 configuration
-#
-
-case "$expat" in
-maybe)
-       ;;
-no)
-       xml2=yes
+case "$confdir" in
+no|yes)
+       confdir=/etc/fonts
        ;;
 *)
        ;;
 *)
-       xml2=no
        ;;
 esac
        ;;
 esac
+AC_SUBST(confdir)
+CONFDIR='${confdir}'
+AC_DEFINE_UNQUOTED(CONFDIR, "$CONFDIR")
+AC_SUBST(CONFDIR)
 
 
-case "$xml2" in
-maybe)
-       ;;
-no)
-       expat=yes
-       ;;
-*)
-       expat=no
-       ;;
-esac
+#
+# Check expat configuration
+#
 
 case "$expat" in
 no)
 
 case "$expat" in
 no)
@@ -259,7 +240,7 @@ no)
        case "$expat_lib" in
        yes)
                case "$expat" in
        case "$expat_lib" in
        yes)
                case "$expat" in
-               yes|maybe)
+               yes)
                        expat_library="-lexpat"
                        ;;
                *)
                        expat_library="-lexpat"
                        ;;
                *)
@@ -317,7 +298,6 @@ no)
                        HAVE_EXPAT=1
                        AC_SUBST(HAVE_EXPAT)
                        AC_DEFINE_UNQUOTED(HAVE_EXPAT,$HAVE_EXPAT)
                        HAVE_EXPAT=1
                        AC_SUBST(HAVE_EXPAT)
                        AC_DEFINE_UNQUOTED(HAVE_EXPAT,$HAVE_EXPAT)
-                       xml2=no
                        ;;
                esac
                ;;
                        ;;
                esac
                ;;
@@ -325,71 +305,10 @@ no)
        ;;
 esac
        
        ;;
 esac
        
-case "$xml2" in
-no)
-       ;;
-*)
-       case "$xml2_includes" in
-       yes|no)
-               xml2_include_path=""
-               ;;
-       *)
-               xml2_include_path="-I$xml2_includes"
-               ;;
-       esac
-       case "$xml2_lib" in
-       yes)
-               case "$xml2" in
-               yes|maybe)
-                       xml2_library="-lxml2"
-                       ;;
-               *)
-                       xml2_library="-L$xml2/lib -lxml2"
-                       ;;
-               esac
-               ;;
-       no)
-               ;;
-       *)
-               xml2_library="-L$xml2_lib -lxml2"
-               ;;
-       esac
-
-       saved_CPPFLAGS="$CPPFLAGS"
-       CPPFLAGS="$CPPFLAGS $xml2_include_path"
-       saved_LIBS="$LIBS"
-       LIBS="$LIBS $xml2_library"
-
-       AC_CHECK_HEADER(libxml/parser.h)
-       case "$ac_cv_header_libxml_parser_h" in
-       no)
-               CPPFLAGS="$saved_CPPFLAGS"
-               LIBS="$saved_LIBS"
-               xml2=no
-               ;;
-       yes)
-               AC_CHECK_FUNCS(xmlInitParser)
-               case "$ac_cv_func_xmlInitParser" in
-               no)
-                       CPPFLAGS="$saved_CPPFLAGS"
-                       LIBS="$saved_LIBS"
-                       xml2=no
-                       ;;
-               yes)
-                       HAVE_XML2=1
-                       AC_SUBST(HAVE_XML2)
-                       AC_DEFINE_UNQUOTED(HAVE_XML2,$HAVE_XML2)
-                       expat=no
-                       ;;
-               esac
-               ;;
-       esac
-       ;;
-esac
        
        
-case "$expat""$xml2" in
-nono)
-       AC_MSG_ERROR([cannot find either libxml2 or expat])
+case "$expat" in
+no)
+       AC_MSG_ERROR([cannot find expat library])
        ;;
 esac
 
        ;;
 esac
 
index baaf3dd11d4c29341c0384ba3ffdb1061ba69a2b..339414273ffc2305af424b7580d7d8ff465cf20e 100644 (file)
@@ -5,7 +5,7 @@ XCOMM $XFree86$
 #include "../local.def"
 #endif
 
 #include "../local.def"
 #endif
 
-INCLUDES=$(FREETYPE2INCLUDES) $(LIBXML2INCLUDES) -I..
+INCLUDES=$(FREETYPE2INCLUDES) -I..
 
 LOCAL_LIBRARIES=FontconfigClientLibs
         DEPLIBS=FontconfigClientDepLibs
 
 LOCAL_LIBRARIES=FontconfigClientLibs
         DEPLIBS=FontconfigClientDepLibs
index efe2999360c417145688e4c314a1d3133fdcf687..e58a684e444e607576f35ac2239c2d95898b72a4 100644 (file)
@@ -1,11 +1,11 @@
-XCOMM $XFree86: xc/lib/fontconfig/fc-lang/Imakefile,v 1.12 2002/08/06 18:59:59 keithp Exp $
+XCOMM $XFree86: xc/lib/fontconfig/fc-lang/Imakefile,v 1.14 2002/08/08 00:10:49 keithp Exp $
 
 #ifdef UseInstalled
 /* building outside the tree, use private defines */
 #include "../local.def"
 #endif
 
 
 #ifdef UseInstalled
 /* building outside the tree, use private defines */
 #include "../local.def"
 #endif
 
-INCLUDES=$(FREETYPE2INCLUDES) $(LIBXML2INCLUDES) -I.. -I../src
+INCLUDES=$(FREETYPE2INCLUDES) -I.. -I../src
 
 LOCAL_LIBRARIES=FontconfigClientLibs
         DEPLIBS=FontconfigClientDepLibs
 
 LOCAL_LIBRARIES=FontconfigClientLibs
         DEPLIBS=FontconfigClientDepLibs
index e234bb5a7bf3554e589784ddc5561046dc33c847..90b48650f664c5804d6dcbbb0c5e257083784d8e 100644 (file)
@@ -1,5 +1,5 @@
 #
 #
-# $XFree86: xc/lib/fontconfig/fc-lang/ja.orth,v 1.2 2002/07/06 23:59:15 keithp Exp $
+# $XFree86: xc/lib/fontconfig/fc-lang/ja.orth,v 1.3 2002/07/13 20:33:05 keithp Exp $
 #
 # Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
 #
 #
 # Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
 #
@@ -21,6 +21,8 @@
 # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 #
 # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 #
+# Coverage from JIS X 0208 (1990)
+#
 0x3000 # IDEOGRAPHIC SPACE
 0x3001 # IDEOGRAPHIC COMMA
 0x3002 # IDEOGRAPHIC FULL STOP
 0x3000 # IDEOGRAPHIC SPACE
 0x3001 # IDEOGRAPHIC COMMA
 0x3002 # IDEOGRAPHIC FULL STOP
index b80163c04ca6ffbdfabcd18c0c5a9c9f11f1d686..d7ccdc965338bf7270dd9540e8b1d0c1302bd3db 100644 (file)
@@ -1,5 +1,5 @@
 #
 #
-# $XFree86: xc/lib/fontconfig/fc-lang/ko.orth,v 1.2 2002/07/06 23:59:16 keithp Exp $
+# $XFree86: xc/lib/fontconfig/fc-lang/ko.orth,v 1.3 2002/07/12 21:05:59 keithp Exp $
 #
 # Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
 #
 #
 # Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
 #
@@ -22,6 +22,9 @@
 # PERFORMANCE OF THIS SOFTWARE.
 #
 # Korean (KO)
 # PERFORMANCE OF THIS SOFTWARE.
 #
 # Korean (KO)
+#
+# Coverage from KSC 5601-1992
+#
 #0x3000        # IDEOGRAPHIC SPACE
 #0x3001        # IDEOGRAPHIC COMMA
 #0x3002        # IDEOGRAPHIC FULL STOP
 #0x3000        # IDEOGRAPHIC SPACE
 #0x3001        # IDEOGRAPHIC COMMA
 #0x3002        # IDEOGRAPHIC FULL STOP
index 907cb21ac0a1c5eecbc06b71adb20fc25221808e..daf233316d117c166456ad909acb3ed8df0a8c24 100644 (file)
@@ -1,5 +1,5 @@
 #
 #
-# $XFree86$
+# $XFree86: xc/lib/fontconfig/fc-lang/zh_cn.orth,v 1.2 2002/07/06 23:59:19 keithp Exp $
 #
 # Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
 #
 #
 # Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
 #
@@ -22,6 +22,9 @@
 # PERFORMANCE OF THIS SOFTWARE.
 #
 # Chinese (simplified) (ZH-CN)
 # PERFORMANCE OF THIS SOFTWARE.
 #
 # Chinese (simplified) (ZH-CN)
+#
+# Coverage computed from GB2312
+#
 0x02C7 # CARON (Mandarin Chinese third tone)
 0x02C9 # MODIFIER LETTER MACRON (Mandarin Chinese first tone)
 0x4E00 # <CJK>
 0x02C7 # CARON (Mandarin Chinese third tone)
 0x02C9 # MODIFIER LETTER MACRON (Mandarin Chinese first tone)
 0x4E00 # <CJK>
index acf86b5b9d90e9b6a69679a2cf2ab13e868029e3..d638086ef8bca91d14bea18bf3eb399b7bc15241 100644 (file)
@@ -1,5 +1,5 @@
 #
 #
-# $XFree86$
+# $XFree86: xc/lib/fontconfig/fc-lang/zh_sg.orth,v 1.1 2002/07/08 07:31:51 keithp Exp $
 #
 # Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
 #
 #
 # Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
 #
@@ -23,5 +23,5 @@
 #
 # Chinese in Singapore (ZH-SG)
 #
 #
 # Chinese in Singapore (ZH-SG)
 #
-# Just use GB2312 as for ZH-CH
+# Just use GB2312 as for ZH-CN
 include zh_cn.orth
 include zh_cn.orth
index 7c2ff97f544d2b4df8dc38da378d4c347cf5736e..74259978624e1b54867d0a99fc7b1ec7d5ab7436 100644 (file)
@@ -5,7 +5,7 @@ XCOMM $XFree86$
 #include "../local.def"
 #endif
 
 #include "../local.def"
 #endif
 
-INCLUDES=$(FREETYPE2INCLUDES) $(LIBXML2INCLUDES) -I..
+INCLUDES=$(FREETYPE2INCLUDES) -I..
 
 LOCAL_LIBRARIES=FontconfigClientLibs
         DEPLIBS=FontconfigClientDepLibs
 
 LOCAL_LIBRARIES=FontconfigClientLibs
         DEPLIBS=FontconfigClientDepLibs
index 3754efa7f64d6fcb551f25b495d525494c4046e5..cd63ad697a1f246b7bee3a5b5e4000afccde3575 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * $XFree86: xc/lib/fontconfig/fontconfig/fcprivate.h,v 1.3 2002/05/31 23:21:24 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/fontconfig/fcprivate.h,v 1.4 2002/08/11 18:10:41 keithp Exp $
  *
  * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
  *
  *
  * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -73,8 +73,6 @@
        case FcTypeFTFace:                                          \
            __v__.u.f = va_arg (va, FT_Face);                       \
            break;                                                  \
        case FcTypeFTFace:                                          \
            __v__.u.f = va_arg (va, FT_Face);                       \
            break;                                                  \
-       case FcTypePattern:                                         \
-           __v__.u.p = va_arg (va, FcPattern *);                   \
        }                                                           \
        if (!FcPatternAdd (__p__, __o__, __v__, FcTrue))            \
            goto _FcPatternVapBuild_bail1;                          \
        }                                                           \
        if (!FcPatternAdd (__p__, __o__, __v__, FcTrue))            \
            goto _FcPatternVapBuild_bail1;                          \
index b5fc1f67100f371445938c113ddd0060ae3d7224..6f378cd9ad702814babdb7a0204c05c0e5b4abe0 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * $XFree86: xc/lib/fontconfig/fontconfig/fontconfig.h,v 1.23 2002/07/28 10:50:58 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/fontconfig/fontconfig.h,v 1.25 2002/08/11 18:10:41 keithp Exp $
  *
  * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
  *
  *
  * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -71,7 +71,6 @@ typedef int           FcBool;
 #define FC_SOURCE          "source"            /* String (X11, freetype) */
 #define FC_CHARSET         "charset"           /* CharSet */
 #define FC_LANG                    "lang"              /* String OS/2 CodePageRange */
 #define FC_SOURCE          "source"            /* String (X11, freetype) */
 #define FC_CHARSET         "charset"           /* CharSet */
 #define FC_LANG                    "lang"              /* String OS/2 CodePageRange */
-#define FC_PATTERN         "pattern"           /* FcPattern */
 
 #define FC_DIR_CACHE_FILE          "fonts.cache"
 #define FC_USER_CACHE_FILE         ".fonts.cache"
 
 #define FC_DIR_CACHE_FILE          "fonts.cache"
 #define FC_USER_CACHE_FILE         ".fonts.cache"
@@ -110,8 +109,7 @@ typedef enum _FcType {
     FcTypeBool,
     FcTypeMatrix,
     FcTypeCharSet,
     FcTypeBool,
     FcTypeMatrix,
     FcTypeCharSet,
-    FcTypeFTFace,
-    FcTypePattern
+    FcTypeFTFace
 } FcType;
 
 typedef struct _FcMatrix {
 } FcType;
 
 typedef struct _FcMatrix {
@@ -278,6 +276,12 @@ FcConfigAppFontAddDir (FcConfig        *config,
 void
 FcConfigAppFontClear (FcConfig     *config);
 
 void
 FcConfigAppFontClear (FcConfig     *config);
 
+FcBool
+FcConfigSubstituteWithPat (FcConfig    *config,
+                          FcPattern    *p,
+                          FcPattern    *p_pat,
+                          FcMatchKind  kind);
+
 FcBool
 FcConfigSubstitute (FcConfig   *config,
                    FcPattern   *p,
 FcBool
 FcConfigSubstitute (FcConfig   *config,
                    FcPattern   *p,
@@ -605,9 +609,6 @@ FcPatternAddCharSet (FcPattern *p, const char *object, const FcCharSet *c);
 FcBool
 FcPatternAddBool (FcPattern *p, const char *object, FcBool b);
 
 FcBool
 FcPatternAddBool (FcPattern *p, const char *object, FcBool b);
 
-FcBool
-FcPatternAddPattern (FcPattern *p, const char *object, const FcPattern *pp);
-
 FcResult
 FcPatternGetInteger (FcPattern *p, const char *object, int n, int *i);
 
 FcResult
 FcPatternGetInteger (FcPattern *p, const char *object, int n, int *i);
 
@@ -626,9 +627,6 @@ FcPatternGetCharSet (FcPattern *p, const char *object, int n, FcCharSet **c);
 FcResult
 FcPatternGetBool (FcPattern *p, const char *object, int n, FcBool *b);
 
 FcResult
 FcPatternGetBool (FcPattern *p, const char *object, int n, FcBool *b);
 
-FcResult
-FcPatternGetPattern (FcPattern *p, const char *object, int n, FcPattern **pp);
-
 FcPattern *
 FcPatternVaBuild (FcPattern *orig, va_list va);
     
 FcPattern *
 FcPatternVaBuild (FcPattern *orig, va_list va);
     
index 48065607e32c5c697a8dc602a24d6c05dc5b3f7b..8480564b61bd864dffc7a27de43b55cb7f68ce6a 100644 (file)
                </edit>
        </match>
 
                </edit>
        </match>
 
+<!--
+  Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
+-->
+       <match target="pattern">
+               <test qual="any" name="family">
+                       <string>sans serif</string>
+               </test>
+               <edit name="family" mode="assign">
+                       <string>sans-serif</string>
+               </edit>
+       </match>
+
 <!--
   Accept deprecated 'sans' alias, replacing it with 'sans-serif'
 -->
 <!--
   Accept deprecated 'sans' alias, replacing it with 'sans-serif'
 -->
index bdb2f7f0828fd12a69593ef40a43e4583ac16ba4..ba6663f913e7ee5821a6bab71ed4a942d5d06a84 100644 (file)
@@ -21,7 +21,7 @@ SOFONTCONFIGREV=1.0
 
 #include <Threads.tmpl>
 
 
 #include <Threads.tmpl>
 
-INCLUDES=$(FREETYPE2INCLUDES) $(LIBXML2INCLUDES) -I..
+INCLUDES=$(FREETYPE2INCLUDES) -I..
 
 DEFINES=-DFC_DEFAULT_FONTS='"$(FC_DEFAULT_FONTS)"' -DHAVE_EXPAT
 
 
 DEFINES=-DFC_DEFAULT_FONTS='"$(FC_DEFAULT_FONTS)"' -DHAVE_EXPAT
 
index f1567da71f656be2a91521693526141502d64bf6..f4d6f917eb8041782bb18e289b7feb4fd30e3c9a 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * $XFree86: xc/lib/fontconfig/src/fccache.c,v 1.7 2002/05/21 17:06:22 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fccache.c,v 1.10 2002/08/06 19:00:43 keithp Exp $
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
 
 #include "fcint.h"
 
 
 #include "fcint.h"
 
+/*
+ * POSIX has broken stdio so that getc must do thread-safe locking,
+ * this is a serious performance problem for applications doing large
+ * amounts of IO with getc (as is done here).  If available, use
+ * the getc_unlocked varient instead.
+ */
+#if defined(getc_unlocked) || defined(_IO_getc_unlocked)
+#define GETC(f) getc_unlocked(f)
+#define PUTC(c,f) putc_unlocked(c,f)
+#else
+#define GETC(f) getc(f)
+#define PUTC(c,f) putc(c,f)
+#endif
+
 #define FC_DBG_CACHE_REF    1024
 
 static FcChar8 *
 #define FC_DBG_CACHE_REF    1024
 
 static FcChar8 *
@@ -35,7 +50,7 @@ FcCacheReadString (FILE *f, FcChar8 *dest, int len)
     int                size;
     int                i;
 
     int                size;
     int                i;
 
-    while ((c = getc (f)) != EOF)
+    while ((c = GETC (f)) != EOF)
        if (c == '"')
            break;
     if (c == EOF)
        if (c == '"')
            break;
     if (c == EOF)
@@ -47,7 +62,7 @@ FcCacheReadString (FILE *f, FcChar8 *dest, int len)
     i = 0;
     d = dest;
     escape = FcFalse;
     i = 0;
     d = dest;
     escape = FcFalse;
-    while ((c = getc (f)) != EOF)
+    while ((c = GETC (f)) != EOF)
     {
        if (!escape)
        {
     {
        if (!escape)
        {
@@ -87,7 +102,7 @@ FcCacheReadUlong (FILE *f, unsigned long *dest)
     unsigned long   t;
     int                    c;
 
     unsigned long   t;
     int                    c;
 
-    while ((c = getc (f)) != EOF)
+    while ((c = GETC (f)) != EOF)
     {
        if (!isspace (c))
            break;
     {
        if (!isspace (c))
            break;
@@ -102,7 +117,7 @@ FcCacheReadUlong (FILE *f, unsigned long *dest)
        if (!isdigit (c))
            return FcFalse;
        t = t * 10 + (c - '0');
        if (!isdigit (c))
            return FcFalse;
        t = t * 10 + (c - '0');
-       c = getc (f);
+       c = GETC (f);
     }
     *dest = t;
     return FcTrue;
     }
     *dest = t;
     return FcTrue;
@@ -141,11 +156,11 @@ FcCacheWriteChars (FILE *f, const FcChar8 *chars)
        switch (c) {
        case '"':
        case '\\':
        switch (c) {
        case '"':
        case '\\':
-           if (putc ('\\', f) == EOF)
+           if (PUTC ('\\', f) == EOF)
                return FcFalse;
            /* fall through */
        default:
                return FcFalse;
            /* fall through */
        default:
-           if (putc (c, f) == EOF)
+           if (PUTC (c, f) == EOF)
                return FcFalse;
        }
     }
                return FcFalse;
        }
     }
@@ -156,11 +171,11 @@ static FcBool
 FcCacheWriteString (FILE *f, const FcChar8 *string)
 {
 
 FcCacheWriteString (FILE *f, const FcChar8 *string)
 {
 
-    if (putc ('"', f) == EOF)
+    if (PUTC ('"', f) == EOF)
        return FcFalse;
     if (!FcCacheWriteChars (f, string))
        return FcFalse;
        return FcFalse;
     if (!FcCacheWriteChars (f, string))
        return FcFalse;
-    if (putc ('"', f) == EOF)
+    if (PUTC ('"', f) == EOF)
        return FcFalse;
     return FcTrue;
 }
        return FcFalse;
     return FcTrue;
 }
@@ -168,17 +183,17 @@ FcCacheWriteString (FILE *f, const FcChar8 *string)
 static FcBool
 FcCacheWritePath (FILE *f, const FcChar8 *dir, const FcChar8 *file)
 {
 static FcBool
 FcCacheWritePath (FILE *f, const FcChar8 *dir, const FcChar8 *file)
 {
-    if (putc ('"', f) == EOF)
+    if (PUTC ('"', f) == EOF)
        return FcFalse;
     if (dir)
        if (!FcCacheWriteChars (f, dir))
            return FcFalse;
     if (dir && dir[strlen((const char *) dir) - 1] != '/')
        return FcFalse;
     if (dir)
        if (!FcCacheWriteChars (f, dir))
            return FcFalse;
     if (dir && dir[strlen((const char *) dir) - 1] != '/')
-       if (putc ('/', f) == EOF)
+       if (PUTC ('/', f) == EOF)
            return FcFalse;
     if (!FcCacheWriteChars (f, file))
        return FcFalse;
            return FcFalse;
     if (!FcCacheWriteChars (f, file))
        return FcFalse;
-    if (putc ('"', f) == EOF)
+    if (PUTC ('"', f) == EOF)
        return FcFalse;
     return FcTrue;
 }
        return FcFalse;
     return FcTrue;
 }
@@ -200,7 +215,7 @@ FcCacheWriteUlong (FILE *f, unsigned long t)
     while (pow)
     {
        digit = temp / pow;
     while (pow)
     {
        digit = temp / pow;
-       if (putc ((char) digit + '0', f) == EOF)
+       if (PUTC ((char) digit + '0', f) == EOF)
            return FcFalse;
        temp = temp - pow * digit;
        pow = pow / 10;
            return FcFalse;
        temp = temp - pow * digit;
        pow = pow / 10;
@@ -767,19 +782,19 @@ FcGlobalCacheSave (FcGlobalCache    *cache,
                continue;
            if (!FcCacheWriteString (f, dir->info.file))
                goto bail4;
                continue;
            if (!FcCacheWriteString (f, dir->info.file))
                goto bail4;
-           if (putc (' ', f) == EOF)
+           if (PUTC (' ', f) == EOF)
                goto bail4;
            if (!FcCacheWriteInt (f, 0))
                goto bail4;
                goto bail4;
            if (!FcCacheWriteInt (f, 0))
                goto bail4;
-           if (putc (' ', f) == EOF)
+           if (PUTC (' ', f) == EOF)
                goto bail4;
            if (!FcCacheWriteTime (f, dir->info.time))
                goto bail4;
                goto bail4;
            if (!FcCacheWriteTime (f, dir->info.time))
                goto bail4;
-           if (putc (' ', f) == EOF)
+           if (PUTC (' ', f) == EOF)
                goto bail4;
            if (!FcCacheWriteString (f, (FcChar8 *) FC_FONT_FILE_DIR))
                goto bail4;
                goto bail4;
            if (!FcCacheWriteString (f, (FcChar8 *) FC_FONT_FILE_DIR))
                goto bail4;
-           if (putc ('\n', f) == EOF)
+           if (PUTC ('\n', f) == EOF)
                goto bail4;
            
            for (file_hash = 0; file_hash < FC_GLOBAL_CACHE_FILE_HASH_SIZE; file_hash++)
                goto bail4;
            
            for (file_hash = 0; file_hash < FC_GLOBAL_CACHE_FILE_HASH_SIZE; file_hash++)
@@ -790,19 +805,19 @@ FcGlobalCacheSave (FcGlobalCache    *cache,
                        continue;
                    if (!FcCacheWritePath (f, dir->info.file, file->info.file))
                        goto bail4;
                        continue;
                    if (!FcCacheWritePath (f, dir->info.file, file->info.file))
                        goto bail4;
-                   if (putc (' ', f) == EOF)
+                   if (PUTC (' ', f) == EOF)
                        goto bail4;
                    if (!FcCacheWriteInt (f, file->id < 0 ? 0 : file->id))
                        goto bail4;
                        goto bail4;
                    if (!FcCacheWriteInt (f, file->id < 0 ? 0 : file->id))
                        goto bail4;
-                   if (putc (' ', f) == EOF)
+                   if (PUTC (' ', f) == EOF)
                        goto bail4;
                    if (!FcCacheWriteTime (f, file->info.time))
                        goto bail4;
                        goto bail4;
                    if (!FcCacheWriteTime (f, file->info.time))
                        goto bail4;
-                   if (putc (' ', f) == EOF)
+                   if (PUTC (' ', f) == EOF)
                        goto bail4;
                    if (!FcCacheWriteString (f, file->name))
                        goto bail4;
                        goto bail4;
                    if (!FcCacheWriteString (f, file->name))
                        goto bail4;
-                   if (putc ('\n', f) == EOF)
+                   if (PUTC ('\n', f) == EOF)
                        goto bail4;
                }
            }
                        goto bail4;
                }
            }
@@ -981,15 +996,15 @@ FcDirCacheWriteDir (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir)
        base = FcFileBaseName (cache_file, dir);
        if (!FcCacheWriteString (f, base))
            goto bail3;
        base = FcFileBaseName (cache_file, dir);
        if (!FcCacheWriteString (f, base))
            goto bail3;
-       if (putc (' ', f) == EOF)
+       if (PUTC (' ', f) == EOF)
            goto bail3;
        if (!FcCacheWriteInt (f, 0))
            goto bail3;
            goto bail3;
        if (!FcCacheWriteInt (f, 0))
            goto bail3;
-        if (putc (' ', f) == EOF)
+        if (PUTC (' ', f) == EOF)
            goto bail3;
        if (!FcCacheWriteString (f, FC_FONT_FILE_DIR))
            goto bail3;
            goto bail3;
        if (!FcCacheWriteString (f, FC_FONT_FILE_DIR))
            goto bail3;
-       if (putc ('\n', f) == EOF)
+       if (PUTC ('\n', f) == EOF)
            goto bail3;
     }
     
            goto bail3;
     }
     
@@ -1005,11 +1020,11 @@ FcDirCacheWriteDir (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir)
            printf (" write file \"%s\"\n", base);
        if (!FcCacheWriteString (f, base))
            goto bail3;
            printf (" write file \"%s\"\n", base);
        if (!FcCacheWriteString (f, base))
            goto bail3;
-       if (putc (' ', f) == EOF)
+       if (PUTC (' ', f) == EOF)
            goto bail3;
        if (!FcCacheWriteInt (f, id))
            goto bail3;
            goto bail3;
        if (!FcCacheWriteInt (f, id))
            goto bail3;
-        if (putc (' ', f) == EOF)
+        if (PUTC (' ', f) == EOF)
            goto bail3;
        name = FcNameUnparse (font);
        if (!name)
            goto bail3;
        name = FcNameUnparse (font);
        if (!name)
@@ -1018,7 +1033,7 @@ FcDirCacheWriteDir (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir)
        free (name);
        if (!ret)
            goto bail3;
        free (name);
        if (!ret)
            goto bail3;
-       if (putc ('\n', f) == EOF)
+       if (PUTC ('\n', f) == EOF)
            goto bail3;
     }
     
            goto bail3;
     }
     
index 328b1ac5f52cae9d3edd45df1c30e21a8fa2605c..ab9927821f11cf0591f327c90713a1f7de176827 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * $XFree86: xc/lib/fontconfig/src/fccfg.c,v 1.18 2002/07/31 01:36:37 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fccfg.c,v 1.19 2002/08/11 18:10:42 keithp Exp $
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -592,18 +592,6 @@ FcConfigCompareValue (FcValue      m,
                break;
            }
            break;
                break;
            }
            break;
-       case FcTypePattern:
-           switch (op) {
-           case FcOpEqual:
-               ret = FcPatternEqual (m.u.p, v.u.p);
-               break;
-           case FcOpNotEqual:
-               ret = !FcPatternEqual (m.u.p, v.u.p);
-               break;
-           default:
-               break;
-           }
-           break;
        }
     }
     else
        }
     }
     else
@@ -1009,9 +997,10 @@ FcConfigPatternCanon (FcPattern       *p,
 }
 
 FcBool
 }
 
 FcBool
-FcConfigSubstitute (FcConfig   *config,
-                   FcPattern   *p,
-                   FcMatchKind kind)
+FcConfigSubstituteWithPat (FcConfig    *config,
+                          FcPattern   *p,
+                          FcPattern   *p_pat,
+                          FcMatchKind kind)
 {
     FcSubst        *s;
     FcSubState     *st;
 {
     FcSubst        *s;
     FcSubState     *st;
@@ -1019,7 +1008,6 @@ FcConfigSubstitute (FcConfig      *config,
     FcTest         *t;
     FcEdit         *e;
     FcValueList            *l;
     FcTest         *t;
     FcEdit         *e;
     FcValueList            *l;
-    FcPattern      *p_pat = 0;
     FcPattern      *m;
 
     if (!config)
     FcPattern      *m;
 
     if (!config)
@@ -1042,10 +1030,7 @@ FcConfigSubstitute (FcConfig     *config,
     if (kind == FcMatchPattern)
        s = config->substPattern;
     else
     if (kind == FcMatchPattern)
        s = config->substPattern;
     else
-    {
        s = config->substFont;
        s = config->substFont;
-       (void) FcPatternGetPattern (p, FC_PATTERN, 0, &p_pat);
-    }
     for (; s; s = s->next)
     {
        /*
     for (; s; s = s->next)
     {
        /*
@@ -1222,6 +1207,14 @@ FcConfigSubstitute (FcConfig     *config,
     return FcTrue;
 }
 
     return FcTrue;
 }
 
+FcBool
+FcConfigSubstitute (FcConfig   *config,
+                   FcPattern   *p,
+                   FcMatchKind kind)
+{
+    return FcConfigSubstituteWithPat (config, p, 0, kind);
+}
+
 #ifndef FONTCONFIG_PATH
 #define FONTCONFIG_PATH        "/etc/fonts"
 #endif
 #ifndef FONTCONFIG_PATH
 #define FONTCONFIG_PATH        "/etc/fonts"
 #endif
index 9f7cec9b93fb9c5eeb0eb6c1ebde248ea4fd56c3..a3deba1634f20937b31985e34d49fb30da97a3e4 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * $XFree86: xc/lib/fontconfig/src/fcdbg.c,v 1.4 2002/06/19 20:08:22 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fcdbg.c,v 1.7 2002/08/11 18:10:42 keithp Exp $
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -54,11 +54,6 @@ FcValuePrint (const FcValue v)
     case FcTypeFTFace:
        printf (" face");
        break;
     case FcTypeFTFace:
        printf (" face");
        break;
-    case FcTypePattern:
-       printf (" pattern {");
-       FcPatternPrint (v.u.p);
-       printf (" } ");
-       break;
     }
 }
 
     }
 }
 
index e57f2bde96454d595a7e52b36fccbbeda80ba64d..0ba7b04ad6ab34168dea1cf4e4b5906c1bf7c1de 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * $XFree86: xc/lib/fontconfig/src/fclist.c,v 1.7 2002/06/19 20:08:22 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fclist.c,v 1.8 2002/08/11 18:10:42 keithp Exp $
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -247,8 +247,6 @@ FcListValueHash (FcValue    v)
        return FcCharSetCount (v.u.c);
     case FcTypeFTFace:
        return (FcChar32) v.u.f;
        return FcCharSetCount (v.u.c);
     case FcTypeFTFace:
        return (FcChar32) v.u.f;
-    case FcTypePattern:
-       return (FcChar32) v.u.p->num;
     }
     return 0;
 }
     }
     return 0;
 }
index 99e9fd1b7c094b414865c542a733e1de9567cf30..3853cb7b4b9f7407921d02bd0258a81df493b709 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * $XFree86: xc/lib/fontconfig/src/fcmatch.c,v 1.16 2002/07/06 23:47:44 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fcmatch.c,v 1.17 2002/08/11 18:10:42 keithp Exp $
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -402,8 +402,7 @@ FcFontRenderPrepare (FcConfig           *config,
        if (!fe)
            FcPatternAdd (new, pe->object, pe->values->value, FcTrue);
     }
        if (!fe)
            FcPatternAdd (new, pe->object, pe->values->value, FcTrue);
     }
-    FcPatternAddPattern (new, FC_PATTERN, pat);
-    FcConfigSubstitute (config, new, FcMatchFont);
+    FcConfigSubstituteWithPat (config, new, pat, FcMatchFont);
     return new;
 }
 
     return new;
 }
 
index fc8c3a41b0d5739c34c7d8774200f03ad14e50f9..29e1c92e936c009c28449d6b1f3376d4db22c293 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * $XFree86: xc/lib/fontconfig/src/fcname.c,v 1.10 2002/06/29 20:31:02 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fcname.c,v 1.11 2002/08/11 18:10:42 keithp Exp $
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -472,8 +472,6 @@ FcNameUnparseValue (FcStrBuf        *buf,
        return FcNameUnparseCharSet (buf, v.u.c);
     case FcTypeFTFace:
        return FcTrue;
        return FcNameUnparseCharSet (buf, v.u.c);
     case FcTypeFTFace:
        return FcTrue;
-    case FcTypePattern:
-       return FcTrue;
     }
     return FcFalse;
 }
     }
     return FcFalse;
 }
index a12414b25006ec94ffc22b35b83436fba9a7e542..bf527a40fccdba593725cb05b35cb3ba2cd91072 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * $XFree86: xc/lib/fontconfig/src/fcpat.c,v 1.12 2002/08/07 01:45:59 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fcpat.c,v 1.13 2002/08/11 18:10:42 keithp Exp $
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -55,9 +55,6 @@ FcValueDestroy (FcValue v)
     case FcTypeCharSet:
        FcCharSetDestroy ((FcCharSet *) v.u.c);
        break;
     case FcTypeCharSet:
        FcCharSetDestroy ((FcCharSet *) v.u.c);
        break;
-    case FcTypePattern:
-       FcPatternDestroy ((FcPattern *) v.u.p);
-       break;
     default:
        break;
     }
     default:
        break;
     }
@@ -82,9 +79,6 @@ FcValueSave (FcValue v)
        if (!v.u.c)
            v.type = FcTypeVoid;
        break;
        if (!v.u.c)
            v.type = FcTypeVoid;
        break;
-    case FcTypePattern:
-       FcPatternReference ((FcPattern *) v.u.p);
-       break;
     default:
        break;
     }
     default:
        break;
     }
@@ -107,9 +101,6 @@ FcValueListDestroy (FcValueList *l)
        case FcTypeCharSet:
            FcCharSetDestroy ((FcCharSet *) l->value.u.c);
            break;
        case FcTypeCharSet:
            FcCharSetDestroy ((FcCharSet *) l->value.u.c);
            break;
-       case FcTypePattern:
-           FcPatternDestroy ((FcPattern *) l->value.u.p);
-           break;
        default:
            break;
        }
        default:
            break;
        }
@@ -154,8 +145,6 @@ FcValueEqual (FcValue va, FcValue vb)
        return FcCharSetEqual (va.u.c, vb.u.c);
     case FcTypeFTFace:
        return va.u.f == vb.u.f;
        return FcCharSetEqual (va.u.c, vb.u.c);
     case FcTypeFTFace:
        return va.u.f == vb.u.f;
-    case FcTypePattern:
-       return FcPatternEqual (va.u.p, vb.u.p);
     }
     return FcFalse;
 }
     }
     return FcFalse;
 }
@@ -206,8 +195,6 @@ FcValueHash (FcValue v)
     case FcTypeFTFace:
        return FcStringHash ((const FcChar8 *) ((FT_Face) v.u.f)->family_name) ^
               FcStringHash ((const FcChar8 *) ((FT_Face) v.u.f)->style_name);
     case FcTypeFTFace:
        return FcStringHash ((const FcChar8 *) ((FT_Face) v.u.f)->family_name) ^
               FcStringHash ((const FcChar8 *) ((FT_Face) v.u.f)->style_name);
-    case FcTypePattern:
-       return (FcChar32) v.u.p->num;
     }
     return FcFalse;
 }
     }
     return FcFalse;
 }
@@ -459,9 +446,6 @@ bail2:
     case FcTypeCharSet:
        FcCharSetDestroy ((FcCharSet *) value.u.c);
        break;
     case FcTypeCharSet:
        FcCharSetDestroy ((FcCharSet *) value.u.c);
        break;
-    case FcTypePattern:
-       FcPatternDestroy ((FcPattern *) value.u.p);
-       break;
     default:
        break;
     }
     default:
        break;
     }
@@ -579,16 +563,6 @@ FcPatternAddFTFace (FcPattern *p, const char *object, const FT_Face f)
     return FcPatternAdd (p, object, v, FcTrue);
 }
 
     return FcPatternAdd (p, object, v, FcTrue);
 }
 
-FcBool
-FcPatternAddPattern (FcPattern *p, const char *object, const FcPattern *pp)
-{
-    FcValue    v;
-
-    v.type = FcTypePattern;
-    v.u.p = pp;
-    return FcPatternAdd (p, object, v, FcTrue);
-}
-
 FcResult
 FcPatternGet (FcPattern *p, const char *object, int id, FcValue *v)
 {
 FcResult
 FcPatternGet (FcPattern *p, const char *object, int id, FcValue *v)
 {
@@ -730,21 +704,6 @@ FcPatternGetFTFace (FcPattern *p, const char *object, int id, FT_Face *f)
     return FcResultMatch;
 }
 
     return FcResultMatch;
 }
 
-FcResult
-FcPatternGetPattern (FcPattern *p, const char *object, int id, FcPattern **pp)
-{
-    FcValue    v;
-    FcResult   r;
-
-    r = FcPatternGet (p, object, id, &v);
-    if (r != FcResultMatch)
-       return r;
-    if (v.type != FcTypePattern)
-        return FcResultTypeMismatch;
-    *pp = (FcPattern *) v.u.p;
-    return FcResultMatch;
-}
-
 FcPattern *
 FcPatternDuplicate (FcPattern *orig)
 {
 FcPattern *
 FcPatternDuplicate (FcPattern *orig)
 {
index e265fa53ff620b92e966d5af63261138d957a2f2..242a56d2c335381f72ec9c9719ff620fb5e4becf 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * $XFree86: xc/lib/fontconfig/src/fcxml.c,v 1.17 2002/07/31 01:36:37 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fcxml.c,v 1.18 2002/08/11 18:10:42 keithp Exp $
  *
  * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
  *
  *
  * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
  *
 #include <stdarg.h>
 #include "fcint.h"
 
 #include <stdarg.h>
 #include "fcint.h"
 
-#ifndef HAVE_EXPAT
-#define HAVE_EXPAT 1
-#endif
-
-#ifndef HAVE_XML2
-#define HAVE_XML2 0
-#endif
-
-#if HAVE_EXPAT
 #ifndef HAVE_XMLPARSE_H
 #define HAVE_XMLPARSE_H 0
 #endif
 #ifndef HAVE_XMLPARSE_H
 #define HAVE_XMLPARSE_H 0
 #endif
+
 #if HAVE_XMLPARSE_H
 #include <xmlparse.h>
 #else
 #include <expat.h>
 #endif
 #if HAVE_XMLPARSE_H
 #include <xmlparse.h>
 #else
 #include <expat.h>
 #endif
-#endif
-
-#if HAVE_XML2
-#include "fclibxml2.h"
-#endif
 
 FcTest *
 FcTestCreate (FcMatchKind   kind, 
 
 FcTest *
 FcTestCreate (FcMatchKind   kind, 
index aedb7141b6bca992ec503df81ae37e80eb6f9815..cac9aba995204d07b3da6547b11e12a4d95d9aa4 100644 (file)
@@ -1,5 +1,5 @@
 .\"
 .\"
-.\" $XFree86: xc/lib/fontconfig/src/fontconfig.man,v 1.2 2002/08/06 19:54:10 keithp Exp $
+.\" $XFree86: xc/lib/fontconfig/src/fontconfig.man,v 1.3 2002/08/11 18:10:43 keithp Exp $
 .\"
 .\" Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
 .\"
 .\"
 .\" Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
 .\"
@@ -865,10 +865,15 @@ void FcConfigAppFontClear (FcConfig *config)
 Clears the set of application-specific fonts.
 
 .TP
 Clears the set of application-specific fonts.
 
 .TP
-FcBool FcConfigSubstitute (FcConfig *config, FcPattern *p, FcMatchKind kind)
+FcBool FcConfigSubstituteWithPat (FcConfig *config, FcPattern *p, FcPattern *p_pat FcMatchKind kind)
 Performs the sequence of pattern modification operations, if 'kind' is
 FcMatchPattern, then those tagged as pattern operations are applied, else 
 Performs the sequence of pattern modification operations, if 'kind' is
 FcMatchPattern, then those tagged as pattern operations are applied, else 
-if 'kind' is FcMatchFont, those tagged as font operations are applied.
+if 'kind' is FcMatchFont, those tagged as font operations are applied and
+p_pat is used for <test> elements with target=pattern.
+
+.TP
+FcBool FcConfigSubstitute (FcConfig *config, FcPattern *p, FcMatchKind kind)
+Calls FcConfigSubstituteWithPat setting p_pat to NULL.
 
 .TP
 FcPattern *FcFontMatch (FcConfig *config, FcPattern *p, FcResult *result)
 
 .TP
 FcPattern *FcFontMatch (FcConfig *config, FcPattern *p, FcResult *result)
@@ -1025,17 +1030,6 @@ Constructs a pattern representing the 'id'th font in 'file'.  The number
 of fonts in 'file' is returned in 'count'.
 
 .SS XML specific functions
 of fonts in 'file' is returned in 'count'.
 
 .SS XML specific functions
-.nf
-.B #include <fontconfig/fcxml.h>
-.fi
-These functions expose the libxml2 datatypes used for font configuration.
-
-.TP
-xmlDocPtr FcConfigLoad (const char *file)
-Loads a configuration file mapping 'file' into a filename with
-FcConfigFilename.  This doesn't load a complete configuration as any
-include files referenced from 'file' will not be loaded.
-
 .TP
 FcBool FcConfigParseAndLoad (FcConfig *config, const FcChar8 *file, FcBool complain)
 Walks the configuration in 'file' and constructs the internal representation in
 .TP
 FcBool FcConfigParseAndLoad (FcConfig *config, const FcChar8 *file, FcBool complain)
 Walks the configuration in 'file' and constructs the internal representation in