aboutsummaryrefslogtreecommitdiff
path: root/fontconfig
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-01-11 08:00:45 +0100
committermarha <marha@users.sourceforge.net>2013-01-11 08:00:45 +0100
commitddc05759f098f06bd93253a7bffe38640963dfb3 (patch)
treefd0ae943233033cda2bfe50dd097532a4cf5c0b9 /fontconfig
parent8a26872f0c9102cb357345eca24a4bf7401bbe70 (diff)
downloadvcxsrv-ddc05759f098f06bd93253a7bffe38640963dfb3.tar.gz
vcxsrv-ddc05759f098f06bd93253a7bffe38640963dfb3.tar.bz2
vcxsrv-ddc05759f098f06bd93253a7bffe38640963dfb3.zip
fontconfig libX11 mesa mkfontscale xserver git update 11 jan 2013
fontconfig: 0831c1770e4bac7269a190936bbb0529d747e233 libX11: 0b148750027fd0557c5ed93afda861ddf4b92e0f mkfontscale: 9cbe3256bc932b82f2435b23cda0931f4f5f5ba2 xserver: 6703a7c7cf1a349c137e247a0c8eb462ff7b07be mesa: babab2876080af0fe65249dff559244aebd0b87e
Diffstat (limited to 'fontconfig')
-rw-r--r--fontconfig/Makefile.am2
-rw-r--r--fontconfig/README105
-rw-r--r--fontconfig/autogen.sh4
-rw-r--r--fontconfig/configure.ac25
-rw-r--r--fontconfig/doc/fclangset.fncs8
-rw-r--r--fontconfig/doc/func.sgml2
-rw-r--r--fontconfig/fc-validate/Makefile.am60
-rw-r--r--fontconfig/fc-validate/fc-validate.c242
-rw-r--r--fontconfig/fc-validate/fc-validate.sgml182
-rw-r--r--fontconfig/fontconfig/fontconfig.h5
-rw-r--r--fontconfig/new-version.sh4
-rw-r--r--fontconfig/src/fcatomic.h12
-rw-r--r--fontconfig/src/fcint.h3
-rw-r--r--fontconfig/src/fcstr.c13
-rw-r--r--fontconfig/test/Makefile.am11
-rw-r--r--fontconfig/test/test-pthread.c79
16 files changed, 741 insertions, 16 deletions
diff --git a/fontconfig/Makefile.am b/fontconfig/Makefile.am
index 6aee88a59..84c91acbb 100644
--- a/fontconfig/Makefile.am
+++ b/fontconfig/Makefile.am
@@ -23,7 +23,7 @@
SUBDIRS=fontconfig fc-case fc-lang fc-glyphname src \
fc-cache fc-cat fc-list fc-match fc-pattern fc-query fc-scan \
- conf.d test
+ fc-validate conf.d test
if ENABLE_DOCS
SUBDIRS += doc
DIST_SUBDIRS = $(SUBDIRS)
diff --git a/fontconfig/README b/fontconfig/README
index 5c666b0f6..fcd3ab343 100644
--- a/fontconfig/README
+++ b/fontconfig/README
@@ -1,12 +1,113 @@
Fontconfig
Font configuration and customization library
- Version 2.10.2
- 2012-03-11
+ Version 2.10.91 (2.11 RC1)
+ 2013-01-10
Check INSTALL for compilation and installation instructions.
Report bugs to https://bugs.freedesktop.org in the fontconfig module.
+2.10.91 (2.11 RC1)
+
+Akira TAGOH (19):
+ Fix a potability issue about stdint.h
+ Fix build issues on clean tree
+ Do not show the deprecation warning if it is a symlink
+ Fix a typo
+ Fix the wrong estimation for the memory usage information in fontconfig
+ Remove the duplicate null-check
+ Remove the dead code
+ clean up
+ Fix a typo that accessing to the out of array
+ Fix a memory leak
+ Check the system font to be initialized
+ Missing header file for _mkdir declaration
+ Clean up the unused variable
+ Bug 47705 - Using O_CLOEXEC
+ missing header file to declare _mkdir
+ Fix a build fail on mingw
+ Fix a typo in the manpages template
+ Bug 29312 - RFE: feature to indicate which characters are missing to satisfy the language support
+ Update the date in README properly
+
+Behdad Esfahbod (73):
+ Fix typo
+ Parse matrices of expressions
+ Fix compiler warnings
+ Fix unused-parameter warnings
+ Fix more warnings
+ Fix sign-compare warnings
+ Fix warning
+ Fix more warnings
+ Fixup from 4f6767470f52b287a2923e7e6d8de5fae1993f67
+ Remove memory accounting and reporting
+ Allow target="font/pattern/default" in <name> elements
+ Don't warn if an unknown element is used in an expression
+ Unbreak build when FC_ARCHITECTURE is defined
+ Remove unneeded stuff
+ Enable fcarch assert checks even when FC_ARCHITECTURE is explicitly given
+ Make tests run on Windows
+ Initialize matrix during name parsing
+ Adjust docs for recent changes
+ Warn if <name target="font"> appears in <match target="pattern">
+ Make FC_DBG_OBJTYPES debug messages into warnings
+ Refuse to set value to unsupported types during config too
+ Add NULL check
+ Don't crash in FcPatternDestroy with NULL pattern
+ Don't crash in FcPatternFormat() with NULL pattern
+ Minor
+ Whitespace
+ Deprecate FcName(Un)RegisterObjectTypes / FcName(Un)RegisterConstants
+ Use a static perfect hash table for object-name lookup
+ Switch .gitignore to git.mk
+ Remove shared-str pool
+ Fix build stuff
+ Add build stuff for threadsafety primitives
+ Add thread-safety primitives
+ Make refcounts, patterns, charsets, strings, and FcLang thread-safe
+ Make FcGetDefaultLang and FcGetDefaultLangs thread-safe
+ Make FcInitDebug() idempotent
+ Make FcDefaultFini() threadsafe
+ Refactor; contain default config in fccfg.c
+ Minor
+ Make default-FcConfig threadsafe
+ Minor
+ Make FcCacheIsMmapSafe() threadsafe
+ Minor
+ Make cache refcounting threadsafe
+ Add a big cache lock
+ Make random-state initialization threadsafe
+ Make cache hash threadsafe
+ Make FcDirCacheDispose() threadsafe
+ Make fcobjs.c thread-safe
+ Warn about undefined/invalid attributes during config parsing
+ Fixup fcobjs.c
+ Remove FcSharedStr*
+ Fix compiler warnings
+ Minor
+ Fix build and warnings on win32
+ Use CC_FOR_BUILD to generate source files
+ Fix more warnings.
+ Trying to fix distcheck
+ Fix build around true/false
+ Work around Sun CPP
+ Really fix cross-compiling and building of tools this time
+ Second try to make Sun CPP happy
+ Ugh, add Tools.mk
+ Minor
+ Don't use blanks for fc-query
+ Remove FcInit() calls from tools
+ Add 10-scale-bitmap-fonts.conf and enable by default
+ Oops, add the actual file
+ Fix pthreads setup
+ Fix memory corruption!
+ Add pthread test
+ Add atomic ops for Solaris
+ Make linker happy
+
+Jon TURNEY (1):
+ Fix build when srcdir != builddir
+
2.10.2
Akira TAGOH (13):
diff --git a/fontconfig/autogen.sh b/fontconfig/autogen.sh
index 93855cb2f..1482e401c 100644
--- a/fontconfig/autogen.sh
+++ b/fontconfig/autogen.sh
@@ -86,7 +86,7 @@ test $TEST_TYPE $FILE || {
exit 1
}
-if test -z "$AUTOGEN_SUBDIR_MODE"; then
+if test -z "$AUTOGEN_SUBDIR_MODE" -a -z "$NOCONFIGURE"; then
if test -z "$*"; then
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
@@ -115,7 +115,7 @@ echo Running $AUTOCONF
$AUTOCONF
cd $ORIGDIR
-if test -z "$AUTOGEN_SUBDIR_MODE"; then
+if test -z "$AUTOGEN_SUBDIR_MODE" -a -z "$NOCONFIGURE"; then
echo Running $srcdir/configure "$@"
$srcdir/configure "$@"
diff --git a/fontconfig/configure.ac b/fontconfig/configure.ac
index 803084c09..06ac8a2e7 100644
--- a/fontconfig/configure.ac
+++ b/fontconfig/configure.ac
@@ -34,7 +34,7 @@ dnl This is the package version number, not the shared library
dnl version. This same version number must appear in fontconfig/fontconfig.h
dnl Yes, it is a pain to synchronize version numbers. Unfortunately, it's
dnl not possible to extract the version number here from fontconfig.h
-AM_INIT_AUTOMAKE(fontconfig, 2.10.2)
+AM_INIT_AUTOMAKE(fontconfig, 2.10.91)
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
dnl libtool versioning
@@ -592,8 +592,26 @@ if $fc_cv_have_intel_atomic_primitives; then
AC_DEFINE(HAVE_INTEL_ATOMIC_PRIMITIVES, 1, [Have Intel __sync_* atomic primitives])
fi
-AC_CHECK_HEADERS(sched.h)
-AC_CHECK_FUNCS(sched_yield)
+AC_CACHE_CHECK([for Solaris atomic operations], fc_cv_have_solaris_atomic_ops, [
+ fc_cv_have_solaris_atomic_ops=false
+ AC_TRY_LINK([
+ #include <atomic.h>
+ /* This requires Solaris Studio 12.2 or newer: */
+ #include <mbarrier.h>
+ void memory_barrier (void) { __machine_rw_barrier (); }
+ int atomic_add (volatile unsigned *i) { return atomic_add_int_nv (i, 1); }
+ void *atomic_ptr_cmpxchg (volatile void **target, void *cmp, void *newval) { return atomic_cas_ptr (target, cmp, newval); }
+ ], [], fc_cv_have_solaris_atomic_ops=true
+ )
+])
+if $fc_cv_have_solaris_atomic_ops; then
+ AC_DEFINE(HAVE_SOLARIS_ATOMIC_OPS, 1, [Have Solaris __machine_*_barrier and atomic_* operations])
+fi
+
+if test "$os_win32" = no && ! $have_pthread; then
+ AC_CHECK_HEADERS(sched.h)
+ AC_SEARCH_LIBS(sched_yield,rt,AC_DEFINE(HAVE_SCHED_YIELD, 1, [Have sched_yield]))
+fi
have_pthread=false
if test "$os_win32" = no; then
@@ -677,6 +695,7 @@ fc-match/Makefile
fc-pattern/Makefile
fc-query/Makefile
fc-scan/Makefile
+fc-validate/Makefile
doc/Makefile
doc/version.sgml
test/Makefile
diff --git a/fontconfig/doc/fclangset.fncs b/fontconfig/doc/fclangset.fncs
index e2a40b854..c08d60c70 100644
--- a/fontconfig/doc/fclangset.fncs
+++ b/fontconfig/doc/fclangset.fncs
@@ -178,6 +178,14 @@ Returns a string set of all languages in <parameter>langset</parameter>.
Returns a string set of all known languages.
@@
+@RET@ FcChar8 *
+@FUNC@ FcLangNormalize
+@TYPE1@ const FcChar8 * @ARG1@ lang
+@PURPOSE@ Normalize the language string
+@DESC@
+Returns a string to make <parameter>lang</parameter> suitable on fontconfig.
+@@
+
@RET@ const FcCharSet *
@FUNC@ FcLangGetCharSet
@TYPE1@ const FcChar8 * @ARG1@ lang
diff --git a/fontconfig/doc/func.sgml b/fontconfig/doc/func.sgml
index 88be32047..73e7761ce 100644
--- a/fontconfig/doc/func.sgml
+++ b/fontconfig/doc/func.sgml
@@ -46,7 +46,7 @@
@?SYNOPSIS@
@SYNOPSIS@
@:@
-#include &lt;fontconfig.h&gt;
+#include &lt;fontconfig/fontconfig.h&gt;
@;@
</funcsynopsisinfo>
@{PROTOTYPE@
diff --git a/fontconfig/fc-validate/Makefile.am b/fontconfig/fc-validate/Makefile.am
new file mode 100644
index 000000000..54edec295
--- /dev/null
+++ b/fontconfig/fc-validate/Makefile.am
@@ -0,0 +1,60 @@
+#
+# fontconfig/fc-query/Makefile.am
+#
+# Copyright © 2003 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 the author(s) not be used in
+# advertising or publicity pertaining to distribution of the software without
+# specific, written prior permission. The authors make no
+# representations about the suitability of this software for any purpose. It
+# is provided "as is" without express or implied warranty.
+#
+# THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+# EVENT SHALL THE AUTHOR(S) 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.
+
+bin_PROGRAMS=fc-validate
+
+DOC2MAN = docbook2man
+
+FC_VALIDATE_SRC=${top_srcdir}/fc-validate
+
+SGML = ${FC_VALIDATE_SRC}/fc-validate.sgml
+
+INCLUDES=-I${top_srcdir} $(FREETYPE_CFLAGS) $(WARN_CFLAGS)
+
+BUILT_MANS=fc-validate.1
+
+if ENABLE_DOCS
+man_MANS=${BUILT_MANS}
+endif
+
+EXTRA_DIST=fc-validate.sgml $(BUILT_MANS)
+
+CLEANFILES =
+
+fc_validate_LDADD = ${top_builddir}/src/libfontconfig.la $(FREETYPE_LIBS)
+
+if USEDOCBOOK
+
+${man_MANS}: ${SGML}
+ $(AM_V_GEN) $(RM) $@; \
+ $(DOC2MAN) ${SGML}; \
+ $(RM) manpage.*
+
+all-local: $(man_MANS)
+
+CLEANFILES += $(man_MANS)
+else
+all-local:
+endif
+
+-include $(top_srcdir)/git.mk
diff --git a/fontconfig/fc-validate/fc-validate.c b/fontconfig/fc-validate/fc-validate.c
new file mode 100644
index 000000000..6ecff3671
--- /dev/null
+++ b/fontconfig/fc-validate/fc-validate.c
@@ -0,0 +1,242 @@
+/*
+ * fontconfig/fc-validate/fc-validate.c
+ *
+ * Copyright © 2003 Keith Packard
+ * Copyright © 2012 Red Hat, Inc.
+ * Red Hat Author(s): Akira TAGOH
+ *
+ * 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 the author(s) not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. The authors make no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE AUTHOR(S) 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#else
+#ifdef linux
+#define HAVE_GETOPT_LONG 1
+#endif
+#define HAVE_GETOPT 1
+#endif
+
+#include <fontconfig/fontconfig.h>
+#include <fontconfig/fcfreetype.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <locale.h>
+
+#ifndef HAVE_GETOPT
+#define HAVE_GETOPT 0
+#endif
+#ifndef HAVE_GETOPT_LONG
+#define HAVE_GETOPT_LONG 0
+#endif
+
+#if HAVE_GETOPT_LONG
+#undef _GNU_SOURCE
+#define _GNU_SOURCE
+#include <getopt.h>
+static const struct option longopts[] = {
+ {"index", 1, 0, 'i'},
+ {"lang", 1, 0, 'l'},
+ {"verbose", 0, 0, 'v'},
+ {"version", 0, 0, 'V'},
+ {"help", 0, 0, 'h'},
+ {NULL,0,0,0},
+};
+#else
+#if HAVE_GETOPT
+extern char *optarg;
+extern int optind, opterr, optopt;
+#endif
+#endif
+
+static void
+usage (char *program, int error)
+{
+ FILE *file = error ? stderr : stdout;
+#if HAVE_GETOPT_LONG
+ fprintf (file, "usage: %s [-Vhv] [-i index] [-l LANG] [--index index] [--lang LANG] [--verbose] [--version] [--help] font-file...\n",
+ program);
+#else
+ fprintf (file, "usage: %s [-Vhv] [-i index] [-l LANG] font-file...\n",
+ program);
+#endif
+ fprintf (file, "Validate font files and print result\n");
+ fprintf (file, "\n");
+#if HAVE_GETOPT_LONG
+ fprintf (file, " -i, --index INDEX display the INDEX face of each font file only\n");
+ fprintf (file, " -l, --lang=LANG set LANG instead of current locale\n");
+ fprintf (file, " -v, --verbose show more detailed information\n");
+ fprintf (file, " -V, --version display font config version and exit\n");
+ fprintf (file, " -h, --help display this help and exit\n");
+#else
+ fprintf (file, " -i INDEX (index) display the INDEX face of each font file only\n");
+ fprintf (file, " -l LANG (lang) set LANG instead of current locale\n");
+ fprintf (file, " -v (verbose) show more detailed information\n");
+ fprintf (file, " -V (version) display font config version and exit\n");
+ fprintf (file, " -h (help) display this help and exit\n");
+#endif
+ exit (error);
+}
+
+int
+main (int argc, char **argv)
+{
+ int index_set = 0;
+ int set_index = 0;
+ FcChar8 *lang = NULL;
+ const FcCharSet *fcs_lang = NULL;
+ int err = 0;
+ int i;
+ FT_Library ftlib;
+ FcBool verbose = FcFalse;
+#if HAVE_GETOPT_LONG || HAVE_GETOPT
+ int c;
+
+ setlocale (LC_ALL, "");
+
+#if HAVE_GETOPT_LONG
+ while ((c = getopt_long (argc, argv, "i:l:mVhv", longopts, NULL)) != -1)
+#else
+ while ((c = getopt (argc, argv, "i:l:mVhv")) != -1)
+#endif
+ {
+ switch (c) {
+ case 'i':
+ index_set = 1;
+ set_index = atoi (optarg);
+ break;
+ case 'l':
+ lang = (FcChar8 *) FcLangNormalize ((const FcChar8 *) optarg);
+ break;
+ case 'v':
+ verbose = FcTrue;
+ break;
+ case 'V':
+ fprintf (stderr, "fontconfig version %d.%d.%d\n",
+ FC_MAJOR, FC_MINOR, FC_REVISION);
+ exit (0);
+ case 'h':
+ usage (argv[0], 0);
+ default:
+ usage (argv[0], 1);
+ }
+ }
+ i = optind;
+#else
+ i = 1;
+ verbose = FcTrue;
+#endif
+
+ if (i == argc)
+ usage (argv[0], 1);
+
+ if (!lang)
+ lang = FcLangNormalize ((const FcChar8 *) setlocale (LC_CTYPE, NULL));
+
+ if (lang)
+ fcs_lang = FcLangGetCharSet (lang);
+
+ if (FT_Init_FreeType (&ftlib))
+ {
+ fprintf (stderr, "Can't initalize FreeType library\n");
+ return 1;
+ }
+
+ for (; i < argc; i++)
+ {
+ int index;
+
+ index = set_index;
+
+ do {
+ FT_Face face;
+ FcCharSet *fcs, *fcs_sub;
+
+ if (FT_New_Face (ftlib, argv[i], index, &face))
+ {
+ if (!index_set && index > 0)
+ break;
+ fprintf (stderr, "Unable to open %s\n", argv[i]);
+ err = 1;
+ }
+ else
+ {
+ FcChar32 count;
+
+ fcs = FcFreeTypeCharSet (face, NULL);
+ fcs_sub = FcCharSetSubtract (fcs_lang, fcs);
+
+ count = FcCharSetCount (fcs_sub);
+ if (count > 0)
+ {
+ FcChar32 ucs4, pos, map[FC_CHARSET_MAP_SIZE];
+
+ printf ("%s:%d Missing %d glyph(s) to satisfy the coverage for %s language\n",
+ argv[i], index, count, lang);
+
+ if (verbose)
+ {
+ for (ucs4 = FcCharSetFirstPage (fcs_sub, map, &pos);
+ ucs4 != FC_CHARSET_DONE;
+ ucs4 = FcCharSetNextPage (fcs_sub, map, &pos))
+ {
+ int j;
+
+ for (j = 0; j < FC_CHARSET_MAP_SIZE; j++)
+ {
+ FcChar32 bits = map[j];
+ FcChar32 base = ucs4 + j * 32;
+ int b = 0;
+
+ while (bits)
+ {
+ if (bits & 1)
+ printf (" 0x%04x\n", base + b);
+ bits >>= 1;
+ b++;
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ printf ("%s:%d Satisfy the coverage for %s language\n", argv[i], index, lang);
+ }
+
+ FcCharSetDestroy (fcs);
+ FcCharSetDestroy (fcs_sub);
+
+ FT_Done_Face (face);
+ }
+
+ index++;
+ } while (index_set == 0);
+ }
+
+ FT_Done_FreeType (ftlib);
+
+ if (lang)
+ FcStrFree (lang);
+
+ FcFini ();
+ return err;
+}
diff --git a/fontconfig/fc-validate/fc-validate.sgml b/fontconfig/fc-validate/fc-validate.sgml
new file mode 100644
index 000000000..c677ef292
--- /dev/null
+++ b/fontconfig/fc-validate/fc-validate.sgml
@@ -0,0 +1,182 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+
+<!-- Process this file with docbook-to-man to generate an nroff manual
+ page: `docbook-to-man manpage.sgml > manpage.1'. You may view
+ the manual page with: `docbook-to-man manpage.sgml | nroff -man |
+ less'. A typical entry in a Makefile or Makefile.am is:
+
+manpage.1: manpage.sgml
+ docbook-to-man $< > $@
+
+
+ The docbook-to-man binary is found in the docbook-to-man package.
+ Please remember that if you create the nroff version in one of the
+ debian/rules file targets (such as build), you will need to include
+ docbook-to-man in your Build-Depends control field.
+
+ -->
+
+ <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+ <!ENTITY dhfirstname "<firstname>Akira</firstname>">
+ <!ENTITY dhsurname "<surname>TAGOH</surname>">
+ <!-- Please adjust the date whenever revising the manpage. -->
+ <!ENTITY dhdate "<date>Sep 10, 2012</date>">
+ <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+ allowed: see man(7), man(1). -->
+ <!ENTITY dhsection "<manvolnum>1</manvolnum>">
+ <!ENTITY dhemail "<email>akira@tagoh.org</email>">
+ <!ENTITY dhusername "Akira TAGOH">
+ <!ENTITY dhucpackage "<refentrytitle>fc-validate</refentrytitle>">
+ <!ENTITY dhpackage "fc-validate">
+
+ <!ENTITY gnu "<acronym>GNU</acronym>">
+ <!ENTITY gpl "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+ <refentryinfo>
+ <address>
+ &dhemail;
+ </address>
+ <author>
+ &dhfirstname;
+ &dhsurname;
+ </author>
+ <copyright>
+ <year>2012</year>
+ <holder>&dhusername;</holder>
+ </copyright>
+ &dhdate;
+ </refentryinfo>
+ <refmeta>
+ &dhucpackage;
+
+ &dhsection;
+ </refmeta>
+ <refnamediv>
+ <refname>&dhpackage;</refname>
+
+ <refpurpose>validate font files</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>&dhpackage;</command>
+
+ <arg><option>-Vhv</option></arg>
+ <sbr>
+ <group>
+ <arg><option>-i</option> <option><replaceable>index</replaceable></option></arg>
+ <arg><option>--index</option> <option><replaceable>index</replaceable></option></arg>
+ </group>
+ <group>
+ <arg><option>-l</option> <option><replaceable>lang</replaceable></option></arg>
+ <arg><option>--lang</option> <option><replaceable>lang</replaceable></option></arg>
+ </group>
+ <arg><option>--verbose</option></arg>
+ <arg><option>--version</option></arg>
+ <arg><option>--help</option></arg>
+ <arg choice="req" rep="repeat"><option><replaceable>font-file</replaceable></option></arg>
+
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>DESCRIPTION</title>
+
+ <para><command>&dhpackage;</command> validates
+ <replaceable>font-file</replaceable>(s) if each fonts satisfies
+ the language coverage according to the orthography files in fontconfig.
+ If <option>--index</option> is given, only one face of each file is
+ validated, otherwise all faces are validated.</para>
+
+ </refsect1>
+ <refsect1>
+ <title>OPTIONS</title>
+
+ <para>This program follows the usual &gnu; command line syntax,
+ with long options starting with two dashes (`-'). A summary of
+ options is included below.</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><option>-i</option>
+ <option>--index</option>
+ <option><replaceable>index</replaceable></option>
+ </term>
+ <listitem>
+ <para>Only query face indexed <replaceable>index</replaceable> of
+ each file.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-l</option>
+ <option>--lang</option>
+ <option><replaceable>lang</replaceable></option>
+ </term>
+ <listitem>
+ <para>Set <replaceable>lang</replaceable> as a language instead of current locale. this is used for <option>-m</option>.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-v</option>
+ <option>--verbose</option>
+ </term>
+ <listitem>
+ <para>Show more detailed information.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-V</option>
+ <option>--version</option>
+ </term>
+ <listitem>
+ <para>Show version of the program and exit.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-h</option>
+ <option>--help</option>
+ </term>
+ <listitem>
+ <para>Show summary of options.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option><replaceable>font-file</replaceable></option>
+ </term>
+ <listitem>
+ <para>Query <replaceable>font-file</replaceable> for font faces.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1>
+ <title>RETURN CODES</title>
+ <para><command>fc-validate</command> returns error code 0 for successful parsing,
+ or 1 if any errors occured or if at least one font face could not be opened.</para>
+ </refsect1>
+
+ <refsect1>
+ <title>AUTHOR</title>
+
+ <para>This manual page was updated by &dhusername; &dhemail;.</para>
+
+ </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
diff --git a/fontconfig/fontconfig/fontconfig.h b/fontconfig/fontconfig/fontconfig.h
index 1af63abfb..52e9438fe 100644
--- a/fontconfig/fontconfig/fontconfig.h
+++ b/fontconfig/fontconfig/fontconfig.h
@@ -52,7 +52,7 @@ typedef int FcBool;
#define FC_MAJOR 2
#define FC_MINOR 10
-#define FC_REVISION 2
+#define FC_REVISION 91
#define FC_VERSION ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION))
@@ -580,6 +580,9 @@ FcInitBringUptoDate (void);
FcPublic FcStrSet *
FcGetLangs (void);
+FcPublic FcChar8 *
+FcLangNormalize (const FcChar8 *lang);
+
FcPublic const FcCharSet *
FcLangGetCharSet (const FcChar8 *lang);
diff --git a/fontconfig/new-version.sh b/fontconfig/new-version.sh
index 3c620ae4c..39514302e 100644
--- a/fontconfig/new-version.sh
+++ b/fontconfig/new-version.sh
@@ -71,8 +71,8 @@ if [ $version != $last ]; then
# header
#
(sed '/^2\.[0-9.]*/,$d' README |
- sed -e "s/Version.*/Version $version_note/" \
- -e "s/200.*/$date/" | awk '
+ sed -r -e "s/Version.*/Version $version_note/" \
+ -e "s/[0-9]{4}\-[0-9]{2}\-[0-9]{2}$/$date/" | awk '
/^[ \t]/ {
gsub ("^[ \t]*", "");
gsub ("[ \t]*$", "");
diff --git a/fontconfig/src/fcatomic.h b/fontconfig/src/fcatomic.h
index 72ae37280..a76431139 100644
--- a/fontconfig/src/fcatomic.h
+++ b/fontconfig/src/fcatomic.h
@@ -87,6 +87,18 @@ typedef int fc_atomic_int_t;
#define fc_atomic_ptr_cmpexch(P,O,N) __sync_bool_compare_and_swap ((P), (O), (N))
+#elif !defined(FC_NO_MT) && defined(HAVE_SOLARIS_ATOMIC_OPS)
+
+#include <atomic.h>
+#include <mbarrier.h>
+
+typedef unsigned int fc_atomic_int_t;
+#define fc_atomic_int_add(AI, V) ( ({__machine_rw_barrier ();}), atomic_add_int_nv (&(AI), (V)) - (V))
+
+#define fc_atomic_ptr_get(P) ( ({__machine_rw_barrier ();}), (void *) *(P))
+#define fc_atomic_ptr_cmpexch(P,O,N) ( ({__machine_rw_barrier ();}), atomic_cas_ptr ((P), (O), (N)) == (void *) (O) ? FcTrue : FcFalse)
+
+
#elif !defined(FC_NO_MT)
#define FC_ATOMIC_INT_NIL 1 /* Warn that fallback implementation is in use. */
diff --git a/fontconfig/src/fcint.h b/fontconfig/src/fcint.h
index 3883bc96e..512926797 100644
--- a/fontconfig/src/fcint.h
+++ b/fontconfig/src/fcint.h
@@ -817,9 +817,6 @@ FcPrivate FcLangSet *
FcFreeTypeLangSet (const FcCharSet *charset,
const FcChar8 *exclusiveLang);
-FcPrivate FcChar8 *
-FcLangNormalize (const FcChar8 *lang);
-
FcPrivate FcLangResult
FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
diff --git a/fontconfig/src/fcstr.c b/fontconfig/src/fcstr.c
index cdab38397..414d6dd6b 100644
--- a/fontconfig/src/fcstr.c
+++ b/fontconfig/src/fcstr.c
@@ -1217,6 +1217,17 @@ FcStrSetDel (FcStrSet *set, const FcChar8 *s)
return FcFalse;
}
+/* TODO Make public */
+static FcStrSet *
+FcStrSetReference (FcStrSet *set)
+{
+ if (FcRefIsConst (&set->ref))
+ return set;
+
+ FcRefInc (&set->ref);
+ return set;
+}
+
void
FcStrSetDestroy (FcStrSet *set)
{
@@ -1245,7 +1256,7 @@ FcStrListCreate (FcStrSet *set)
if (!list)
return 0;
list->set = set;
- FcRefInc (&set->ref);
+ FcStrSetReference (set);
list->n = 0;
return list;
}
diff --git a/fontconfig/test/Makefile.am b/fontconfig/test/Makefile.am
index 3fd343a24..664138a5b 100644
--- a/fontconfig/test/Makefile.am
+++ b/fontconfig/test/Makefile.am
@@ -4,6 +4,17 @@ TESTS=run-test.sh
TESTDATA=4x6.pcf 8x16.pcf out.expected fonts.conf.in
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)
+
+if HAVE_PTHREAD
+check_PROGRAMS = test-pthread
+noinst_PROGRAMS = $(check_PROGRAMS)
+test_pthread_LDADD = $(top_builddir)/src/libfontconfig.la
+# We don't enable this test by default because it will require config and fonts
+# to meaningfully test anything, and we are not installed yet.
+#TESTS += test-pthread
+endif
+
EXTRA_DIST=$(check_SCRIPTS) $(TESTDATA)
CLEANFILES=
diff --git a/fontconfig/test/test-pthread.c b/fontconfig/test/test-pthread.c
new file mode 100644
index 000000000..7701a24f7
--- /dev/null
+++ b/fontconfig/test/test-pthread.c
@@ -0,0 +1,79 @@
+/* Code originally from Raimund Steger. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <pthread.h>
+#include <fontconfig/fontconfig.h>
+
+#define NTHR 100
+#define NTEST 100
+
+struct thr_arg_s
+{
+ int thr_num;
+};
+
+static void test_match(int thr_num,int test_num)
+{
+ FcPattern *pat;
+ FcPattern *match;
+ FcResult result;
+
+ FcInit();
+
+ pat = FcNameParse((const FcChar8 *)"New Century Schoolbook");
+
+ FcConfigSubstitute(0,pat,FcMatchPattern);
+ FcDefaultSubstitute(pat);
+
+ match = FcFontMatch(0,pat,&result);
+
+ FcPatternDestroy(pat);
+ FcPatternDestroy(match);
+}
+
+static void *run_test_in_thread(void *arg)
+{
+ struct thr_arg_s *thr_arg=(struct thr_arg_s *)arg;
+ int thread_num = thr_arg->thr_num;
+ int i=0;
+
+ for(;i<NTEST;i++) test_match(thread_num,i);
+
+ printf("Thread %d: done\n",thread_num);
+
+ return NULL;
+}
+
+int main(int argc,char **argv)
+{
+ pthread_t threads[NTHR];
+ int i, j;
+
+ printf("Creating %d threads\n",NTHR);
+
+ for(i = 0;i<NTHR;i++)
+ {
+ struct thr_arg_s thr_arg;
+ int result;
+ thr_arg.thr_num=i;
+ result = pthread_create(&threads[i],NULL,run_test_in_thread,
+ (void *)&thr_arg);
+ if(result!=0)
+ {
+ fprintf(stderr,"Cannot create thread %d\n",i);
+ break;
+ }
+ }
+
+ for(j=0;j<i;j++)
+ {
+ pthread_join(threads[j],NULL);
+ printf("Joined thread %d\n",j);
+ }
+
+ FcFini();
+
+ return 0;
+}