platform/upstream/fontconfig.git
11 years agoSwitch .gitignore to git.mk
Behdad Esfahbod [Sat, 6 Oct 2012 21:52:39 +0000 (17:52 -0400)]
Switch .gitignore to git.mk

11 years agoUse a static perfect hash table for object-name lookup
Behdad Esfahbod [Thu, 20 Sep 2012 18:42:31 +0000 (14:42 -0400)]
Use a static perfect hash table for object-name lookup

The hash table is generated by gperf.  For runtime element types, we use
a append-only linked list.

A bit clumsy, but I think I got it right.

11 years agoDeprecate FcName(Un)RegisterObjectTypes / FcName(Un)RegisterConstants
Behdad Esfahbod [Thu, 20 Sep 2012 18:01:47 +0000 (14:01 -0400)]
Deprecate FcName(Un)RegisterObjectTypes / FcName(Un)RegisterConstants

These never worked as intended.  The problem is, if Fontconfig tries to
read config files when these new types / constants are not registered,
it errs.  As a result, no defined types / constants are usable from
config files.  Which makes these really useless.  Xft was the only user
of this API and even there it's not really used.  Just kill it.

One inch closer to thread-safety since we can fix the object-type hash
table at compile time.

11 years agoWhitespace
Behdad Esfahbod [Wed, 2 Jan 2013 02:28:08 +0000 (20:28 -0600)]
Whitespace

11 years agoMinor
Behdad Esfahbod [Wed, 2 Jan 2013 02:27:54 +0000 (20:27 -0600)]
Minor

11 years agoDon't crash in FcPatternFormat() with NULL pattern
Behdad Esfahbod [Wed, 2 Jan 2013 02:20:31 +0000 (20:20 -0600)]
Don't crash in FcPatternFormat() with NULL pattern

11 years agoDon't crash in FcPatternDestroy with NULL pattern
Behdad Esfahbod [Wed, 2 Jan 2013 02:20:12 +0000 (20:20 -0600)]
Don't crash in FcPatternDestroy with NULL pattern

11 years agoAdd NULL check
Behdad Esfahbod [Wed, 2 Jan 2013 02:10:18 +0000 (20:10 -0600)]
Add NULL check

11 years agoRefuse to set value to unsupported types during config too
Behdad Esfahbod [Wed, 2 Jan 2013 02:09:08 +0000 (20:09 -0600)]
Refuse to set value to unsupported types during config too

11 years agoMake FC_DBG_OBJTYPES debug messages into warnings
Behdad Esfahbod [Wed, 2 Jan 2013 01:52:14 +0000 (19:52 -0600)]
Make FC_DBG_OBJTYPES debug messages into warnings

And remove FC_DBG_OBJTYPES since it has no use now.

11 years agoWarn if <name target="font"> appears in <match target="pattern">
Behdad Esfahbod [Tue, 1 Jan 2013 02:11:12 +0000 (20:11 -0600)]
Warn if <name target="font"> appears in <match target="pattern">

11 years agoAdjust docs for recent changes
Behdad Esfahbod [Tue, 1 Jan 2013 02:00:17 +0000 (20:00 -0600)]
Adjust docs for recent changes

11 years agoInitialize matrix during name parsing
Behdad Esfahbod [Tue, 1 Jan 2013 01:55:37 +0000 (19:55 -0600)]
Initialize matrix during name parsing

Before:
$ fc-match sans:matrix=2 -v | grep matrix
matrix: [2 6.95183e-310; 0 0](s)

After:
$ fc-match sans:matrix=2 -v | grep matrix
matrix: [2 0; 0 1](s)

11 years agoMake tests run on Windows
Behdad Esfahbod [Mon, 31 Dec 2012 23:21:07 +0000 (17:21 -0600)]
Make tests run on Windows

11 years agoEnable fcarch assert checks even when FC_ARCHITECTURE is explicitly given
Behdad Esfahbod [Mon, 31 Dec 2012 23:20:29 +0000 (17:20 -0600)]
Enable fcarch assert checks even when FC_ARCHITECTURE is explicitly given

After all, if the asserts fail, the resulting library simply can't be
working correctly.

11 years agoRemove unneeded stuff
Behdad Esfahbod [Mon, 31 Dec 2012 23:20:12 +0000 (17:20 -0600)]
Remove unneeded stuff

11 years agoUnbreak build when FC_ARCHITECTURE is defined
Behdad Esfahbod [Mon, 31 Dec 2012 23:00:19 +0000 (17:00 -0600)]
Unbreak build when FC_ARCHITECTURE is defined

11 years agoDon't warn if an unknown element is used in an expression
Behdad Esfahbod [Mon, 31 Dec 2012 01:08:42 +0000 (19:08 -0600)]
Don't warn if an unknown element is used in an expression

The type will be resolved at runtime...

For example, we can do this now without getting a warning:

<match target="font">
  <test name="scalable" compare="eq">
    <bool>false</bool>
  </test>
  <edit name="pixelsizefixupfactor" mode="assign">
    <divide>
      <name target="pattern">pixelsize</name>
      <name target="font"   >pixelsize</name>
    </divide>
  </edit>
  <edit name="matrix" mode="assign">
    <times>
      <name>matrix</name>
      <matrix>
        <name>pixelsizefixupfactor</name> <double>0</double>
        <double>0</double> <name>pixelsizefixupfactor</name>
       </matrix>
    </times>
  </edit>
  <edit name="size" mode="assign">
    <divide>
      <name>size</name>
      <name>pixelsizefixupfactor</name>
    </divide>
  </edit>
</match>

Previously the last edit was generating:

Fontconfig warning: "/home/behdad/.local/etc/fonts/conf.d/00-scale-bitmap-fonts.conf", line 29: saw unknown, expected number

11 years agoAllow target="font/pattern/default" in <name> elements
Behdad Esfahbod [Sun, 30 Dec 2012 04:58:38 +0000 (23:58 -0500)]
Allow target="font/pattern/default" in <name> elements

Based on idea from Raimund Steger.

For example, one can do something like this:

<match target="font">
  <test name="scalable" compare="eq">
    <bool>false</bool>
  </test>
  <edit name="pixelsizefixupfactor" mode="assign">
    <divide>
      <name target="pattern">pixelsize</name>
      <name target="font"   >pixelsize</name>
    </divide>
  </edit>
  <edit name="matrix" mode="assign">
    <times>
      <name>matrix</name>
      <matrix>
        <name>pixelsizefixupfactor</name> <double>0</double>
        <double>0</double> <name>pixelsizefixupfactor</name>
       </matrix>
    </times>
  </edit>
</match>

Part of work to make bitmap font scaling possible.  See thread
discussion:

http://lists.freedesktop.org/archives/fontconfig/2012-December/004498.html

11 years agoRemove memory accounting and reporting
Behdad Esfahbod [Sun, 30 Dec 2012 04:12:07 +0000 (23:12 -0500)]
Remove memory accounting and reporting

That belongs in tools like cairo/util/malloc-stat.so

11 years agoFixup from 4f6767470f52b287a2923e7e6d8de5fae1993f67
Behdad Esfahbod [Sun, 30 Dec 2012 03:57:53 +0000 (22:57 -0500)]
Fixup from 4f6767470f52b287a2923e7e6d8de5fae1993f67

11 years agoFix more warnings
Behdad Esfahbod [Sun, 30 Dec 2012 03:56:14 +0000 (22:56 -0500)]
Fix more warnings

11 years agoFix warning
Behdad Esfahbod [Sun, 30 Dec 2012 03:55:36 +0000 (22:55 -0500)]
Fix warning

11 years agoFix sign-compare warnings
Behdad Esfahbod [Sun, 30 Dec 2012 03:47:49 +0000 (22:47 -0500)]
Fix sign-compare warnings

11 years agoFix more warnings
Behdad Esfahbod [Sun, 30 Dec 2012 03:33:33 +0000 (22:33 -0500)]
Fix more warnings

11 years agoFix unused-parameter warnings
Behdad Esfahbod [Sun, 30 Dec 2012 03:32:56 +0000 (22:32 -0500)]
Fix unused-parameter warnings

11 years agoFix compiler warnings
Behdad Esfahbod [Sun, 30 Dec 2012 03:11:09 +0000 (22:11 -0500)]
Fix compiler warnings

11 years agoParse matrices of expressions
Behdad Esfahbod [Sun, 30 Dec 2012 02:39:06 +0000 (21:39 -0500)]
Parse matrices of expressions

Previously a <matrix> element could only accept four <double> literals.
It now accepts full expressions, which can in turn poke into the
pattern, do math, etc.

11 years agoFix typo
Behdad Esfahbod [Sun, 30 Dec 2012 01:14:07 +0000 (20:14 -0500)]
Fix typo

Ouch, this has been wrong since 2004...  I guess no one uses <patelt>
stuff.

11 years agoCheck the system font to be initialized
Akira TAGOH [Tue, 11 Dec 2012 09:53:57 +0000 (18:53 +0900)]
Check the system font to be initialized

config->fonts is an array and checking if config->fonts is a null
will not be useful.

11 years agoFix a memory leak
Akira TAGOH [Tue, 11 Dec 2012 03:38:42 +0000 (12:38 +0900)]
Fix a memory leak

11 years agoFix a typo that accessing to the out of array
Akira TAGOH [Tue, 11 Dec 2012 03:35:02 +0000 (12:35 +0900)]
Fix a typo that accessing to the out of array

11 years agoclean up
Akira TAGOH [Tue, 11 Dec 2012 03:30:05 +0000 (12:30 +0900)]
clean up

ret won't be -1 if HAVE_STRUCT_DIRENT_D_TYPE isn't defined.

11 years agoRemove the dead code
Akira TAGOH [Tue, 11 Dec 2012 02:37:23 +0000 (11:37 +0900)]
Remove the dead code

11 years agoRemove the duplicate null-check
Akira TAGOH [Mon, 10 Dec 2012 01:54:47 +0000 (10:54 +0900)]
Remove the duplicate null-check

11 years agoFix the wrong estimation for the memory usage information in fontconfig
Akira TAGOH [Fri, 7 Dec 2012 10:09:36 +0000 (19:09 +0900)]
Fix the wrong estimation for the memory usage information in fontconfig

11 years agoFix a typo
Akira TAGOH [Thu, 6 Dec 2012 10:49:05 +0000 (19:49 +0900)]
Fix a typo

11 years agoDo not show the deprecation warning if it is a symlink
Akira TAGOH [Wed, 5 Dec 2012 09:13:25 +0000 (18:13 +0900)]
Do not show the deprecation warning if it is a symlink

11 years agoFix build issues on clean tree
Akira TAGOH [Fri, 30 Nov 2012 11:10:30 +0000 (20:10 +0900)]
Fix build issues on clean tree

11 years agoFix build when srcdir != builddir
Jon TURNEY [Wed, 28 Nov 2012 16:10:28 +0000 (16:10 +0000)]
Fix build when srcdir != builddir

When ./configure'd in a directory other than the srcdir, we need to look
in ${top_builddir)/src for the generated header fcstdint.h

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
11 years agoFix a potability issue about stdint.h
Akira TAGOH [Tue, 27 Nov 2012 09:25:11 +0000 (18:25 +0900)]
Fix a potability issue about stdint.h

11 years agoBump version to 2.10.2 2.10.2
Akira TAGOH [Mon, 26 Nov 2012 08:21:14 +0000 (17:21 +0900)]
Bump version to 2.10.2

11 years agoBug 57286 - Remove UnBatang and Baekmuk Batang from monospace in 65-nonlatin.conf
Akira TAGOH [Tue, 20 Nov 2012 11:09:10 +0000 (20:09 +0900)]
Bug 57286 - Remove UnBatang and Baekmuk Batang from monospace in 65-nonlatin.conf

Those two fonts are serif fonts. shouldn't be added to monospace.

11 years agoUpdate CaseFolding.txt to Unicode 6.2
Akira TAGOH [Tue, 20 Nov 2012 02:48:17 +0000 (11:48 +0900)]
Update CaseFolding.txt to Unicode 6.2

No real updates between 6.1 and 6.2, but anyway.

11 years agoBug 57114 - regression on FcFontMatch with namelang
Akira TAGOH [Thu, 15 Nov 2012 07:37:01 +0000 (16:37 +0900)]
Bug 57114 - regression on FcFontMatch with namelang

After 7587d1c99d9476b6dd4dbe523c0204da700fed8d applied, family,
style, and fullname is localized against current locale or lang
if any though, the string in other languages were dropped from
the pattern. this caused unexpected mismatch on the target="font"
rules.

This fix adds other strings at the end of the list.

11 years agoBug 56531 - autogen.sh fails due to missing 'm4' directory
Akira TAGOH [Tue, 30 Oct 2012 00:56:24 +0000 (09:56 +0900)]
Bug 56531 - autogen.sh fails due to missing 'm4' directory

Keep m4 directory in git.

11 years agoUse automake variable instead of cleaning files in clean-local
Akira TAGOH [Fri, 26 Oct 2012 05:31:23 +0000 (14:31 +0900)]
Use automake variable instead of cleaning files in clean-local

just for git.mk coming up from Behdad's threadsafe branch

11 years agoautogen.sh: Add -I option to tell aclocal a place for external m4 files
Akira TAGOH [Tue, 23 Oct 2012 06:52:37 +0000 (15:52 +0900)]
autogen.sh: Add -I option to tell aclocal a place for external m4 files

11 years agoFix syntax errors in fonts.dtd.
Akira TAGOH [Tue, 9 Oct 2012 02:05:59 +0000 (11:05 +0900)]
Fix syntax errors in fonts.dtd.

Patch from Steve Simpson

11 years agoFix wrongly squashing for the network path on Win32.
Akira TAGOH [Tue, 9 Oct 2012 02:03:03 +0000 (11:03 +0900)]
Fix wrongly squashing for the network path on Win32.

Patch from Diego Santa Cruz

11 years agodeal with warnings as errors for the previous change
Akira TAGOH [Tue, 11 Sep 2012 09:09:36 +0000 (18:09 +0900)]
deal with warnings as errors for the previous change

missed this change to commit. doh!

11 years agoBug 52573 - patch required to build 2.10.x with oldish GNU C library headers
Akira TAGOH [Fri, 31 Aug 2012 06:10:50 +0000 (15:10 +0900)]
Bug 52573 - patch required to build 2.10.x with oldish GNU C library headers

On older libc, _POSIX_C_SOURCE didn't satisfy to use posix_fadvise()
and AC_CHECK_FUNCS doesn't check a header file if the function is
declared there properly. so use AC_LINK_IFELSE instead.

11 years agoBug 54138 - X_OK permission is invalid for win32 access(..) calls
Akira TAGOH [Fri, 31 Aug 2012 03:39:38 +0000 (12:39 +0900)]
Bug 54138 - X_OK permission is invalid for win32 access(..) calls

X_OK checking was added back in 8ae1e3d5dc323542e7def06a42deea62c7ba7027
which was removed due to the same reason in
238489030a64fa883f8f9fc3d73247b7f7257899.
apparently the test case in Bug#18934 still works without it.
so I'm removing it again to get this working on Windows.

11 years agoRemove _CONFIG_FIXUPS_H_ guards, so multiple includes of "config.h" result in the...
Jeremy Huddleston Sequoia [Mon, 27 Aug 2012 21:52:23 +0000 (14:52 -0700)]
Remove _CONFIG_FIXUPS_H_ guards, so multiple includes of "config.h" result in the correct values

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
11 years agoFix for libtoolize's warnings
Akira TAGOH [Mon, 27 Aug 2012 07:36:49 +0000 (16:36 +0900)]
Fix for libtoolize's warnings

11 years agoFix N'ko orthography
Behdad Esfahbod [Sat, 25 Aug 2012 18:10:14 +0000 (14:10 -0400)]
Fix N'ko orthography

11 years agoBug 53585 - Two highly-visible typos in src/fcxml.c
Akira TAGOH [Thu, 16 Aug 2012 11:33:12 +0000 (20:33 +0900)]
Bug 53585 - Two highly-visible typos in src/fcxml.c

11 years agoBump version to 2.10.1 2.10.1
Akira TAGOH [Fri, 27 Jul 2012 02:22:14 +0000 (11:22 +0900)]
Bump version to 2.10.1

11 years agoInstall config files first
Akira TAGOH [Mon, 23 Jul 2012 04:59:16 +0000 (13:59 +0900)]
Install config files first

Use install-data-hook instead of install-data-local.
This allows on the real installation to create a symlink with
the broken ln command though, still not work with the pseudo
installation by using DESTDIR say.

11 years agoFix a typo in fontconfig.pc
Akira TAGOH [Thu, 19 Jul 2012 01:20:30 +0000 (10:20 +0900)]
Fix a typo in fontconfig.pc

Reported by Daniel Macks

11 years agocorrect version 2.10.0
Akira TAGOH [Tue, 17 Jul 2012 05:20:48 +0000 (14:20 +0900)]
correct version

11 years agoBump version to 2.10
Akira TAGOH [Tue, 17 Jul 2012 02:36:01 +0000 (11:36 +0900)]
Bump version to 2.10

11 years agoUpdate INSTALL
Akira TAGOH [Tue, 17 Jul 2012 02:35:41 +0000 (11:35 +0900)]
Update INSTALL

11 years agoBump libtool revision
Akira TAGOH [Tue, 17 Jul 2012 02:34:31 +0000 (11:34 +0900)]
Bump libtool revision

11 years agoFix a build fail with gcc 2.95, not supporting the flexible array members.
Akira TAGOH [Mon, 18 Jun 2012 02:23:39 +0000 (11:23 +0900)]
Fix a build fail with gcc 2.95, not supporting the flexible array members.

11 years agoUpdate CaseFolding.txt to Unicode 6.1
Akira TAGOH [Fri, 6 Jul 2012 10:02:05 +0000 (19:02 +0900)]
Update CaseFolding.txt to Unicode 6.1

11 years agoBug 34266 - configs silently ignored if libxml2 doesn't support SAX1 interface
Akira TAGOH [Tue, 3 Jul 2012 10:56:56 +0000 (19:56 +0900)]
Bug 34266 - configs silently ignored if libxml2 doesn't support SAX1 interface

Check if libxml2 has built with --with-sax1

11 years agoBump version to 2.9.92 2.9.92
Akira TAGOH [Mon, 25 Jun 2012 05:57:51 +0000 (14:57 +0900)]
Bump version to 2.9.92

11 years agoUpdate INSTALL
Akira TAGOH [Mon, 25 Jun 2012 05:57:40 +0000 (14:57 +0900)]
Update INSTALL

11 years agoBump libtool revision
Akira TAGOH [Mon, 25 Jun 2012 05:50:18 +0000 (14:50 +0900)]
Bump libtool revision

11 years agoBug 18726 - RFE: help write locale-specific tests
Akira TAGOH [Tue, 24 Apr 2012 10:11:41 +0000 (19:11 +0900)]
Bug 18726 - RFE: help write locale-specific tests

Add an example matching rule for the language specific

11 years agoFix warning about deprecated, non-existent config includes
Marius Tolzmann [Thu, 21 Jun 2012 19:01:10 +0000 (21:01 +0200)]
Fix warning about deprecated, non-existent config includes

Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 8: reading configurations from ~/.fonts.conf.d is deprecated.

Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.

Be polite and do not issue the warning if deprecated config includes
(e.g. ~/.fonts.conf.d and/or ~/.fonts.conf) do not exist.

11 years agoFix newline in warning about deprecated config includes
Marius Tolzmann [Thu, 21 Jun 2012 19:01:09 +0000 (21:01 +0200)]
Fix newline in warning about deprecated config includes

11 years agoRename configure.in to configure.ac
Akira TAGOH [Mon, 18 Jun 2012 09:31:36 +0000 (18:31 +0900)]
Rename configure.in to configure.ac

11 years agoclean up the lock file properly on even hardlink-not-supported filesystem.
Akira TAGOH [Mon, 18 Jun 2012 01:52:21 +0000 (10:52 +0900)]
clean up the lock file properly on even hardlink-not-supported filesystem.

11 years agoFix the fail of make install with --disable-shared on Win32
Akira TAGOH [Thu, 14 Jun 2012 02:27:31 +0000 (11:27 +0900)]
Fix the fail of make install with --disable-shared on Win32

11 years agoFix a build fail on MINGW
Akira TAGOH [Wed, 13 Jun 2012 11:01:30 +0000 (20:01 +0900)]
Fix a build fail on MINGW

11 years agoFix a typo and build fail.
Akira TAGOH [Tue, 12 Jun 2012 02:02:03 +0000 (11:02 +0900)]
Fix a typo and build fail.

11 years agoBug 50835 - Deprecate FC_GLOBAL_ADVANCE
Akira TAGOH [Mon, 11 Jun 2012 05:14:41 +0000 (14:14 +0900)]
Bug 50835 - Deprecate FC_GLOBAL_ADVANCE

FC_GLOBAL_ADVANCE is deprecated. this flag is simply ignored on
freetype 2.4.5 or later.

11 years agoBump version to 2.9.91 2.9.91
Akira TAGOH [Mon, 11 Jun 2012 11:15:15 +0000 (20:15 +0900)]
Bump version to 2.9.91

11 years agofix building for WIN32
Mark Brand [Mon, 11 Jun 2012 11:13:02 +0000 (20:13 +0900)]
fix building for WIN32

8c255fb185d5651b57380b0a9443001e8051b29d moved some code out of switch
but did not declare 'buffer'. Also, replacing the "break" with
"goto bail" neglected the WIN32 specific code.

11 years agoGenerate bzip2-compressed tarball too
Akira TAGOH [Mon, 11 Jun 2012 09:43:56 +0000 (18:43 +0900)]
Generate bzip2-compressed tarball too

11 years agodoc: Fix distcheck error again...
Akira TAGOH [Mon, 11 Jun 2012 09:39:37 +0000 (18:39 +0900)]
doc: Fix distcheck error again...

11 years agoBump libtool revision
Akira TAGOH [Mon, 11 Jun 2012 08:48:12 +0000 (17:48 +0900)]
Bump libtool revision

11 years agoBug 50525 - superfluous whitespace in the style
Akira TAGOH [Fri, 8 Jun 2012 10:41:59 +0000 (19:41 +0900)]
Bug 50525 - superfluous whitespace in the style

11 years agofcdefault: Add the lang object at FcConfigSubstituteWithPat() only when kind is FcMat...
Akira TAGOH [Fri, 8 Jun 2012 10:17:57 +0000 (19:17 +0900)]
fcdefault: Add the lang object at FcConfigSubstituteWithPat() only when kind is FcMatchPattern

11 years agofcdefault: no need to set FC_LANG in FcDefaultSubstitute() anymore
Akira TAGOH [Fri, 8 Jun 2012 06:54:48 +0000 (15:54 +0900)]
fcdefault: no need to set FC_LANG in FcDefaultSubstitute() anymore

11 years agoAdd the default language to the pattern prior to do build the substitution
Akira TAGOH [Tue, 22 May 2012 05:17:10 +0000 (14:17 +0900)]
Add the default language to the pattern prior to do build the substitution

the default language is referred from the FC_LANG environment variable
or the current locale

11 years agofcdefault: fallback if the environment variables are empty
Akira TAGOH [Fri, 8 Jun 2012 06:47:52 +0000 (15:47 +0900)]
fcdefault: fallback if the environment variables are empty

try to fallback if FC_LANG, LC_ALL, LC_CTYPE and LANG is empty

11 years agoBug 32853 - Export API to get the default language
Akira TAGOH [Thu, 29 Mar 2012 11:25:20 +0000 (20:25 +0900)]
Bug 32853 - Export API to get the default language

Add a new API FcGetDefaultLangs() to export the string sets of the default
languages.

12 years agoFix the wrong estimation for the memory usage information in fontconfig
Akira TAGOH [Fri, 1 Jun 2012 10:06:17 +0000 (19:06 +0900)]
Fix the wrong estimation for the memory usage information in fontconfig

12 years agoFix a typo and polish the previous change
Akira TAGOH [Thu, 31 May 2012 03:46:55 +0000 (12:46 +0900)]
Fix a typo and polish the previous change

12 years agoFix the build fail on Solaris
Akira TAGOH [Wed, 30 May 2012 09:21:57 +0000 (18:21 +0900)]
Fix the build fail on Solaris

It's introduced by 0ac6c98294d666762960824d39329459b22b48b7.
Use lstat() and S_ISDIR() to check if it's the directory or not
if there are no d_type in struct dirent.

12 years agoFix cache aging for fonts on FAT filesystem under Linux
Mikhail Gusarov [Mon, 28 May 2012 05:52:21 +0000 (14:52 +0900)]
Fix cache aging for fonts on FAT filesystem under Linux

Windows does not update mtime of directory on FAT filesystem when
file is added to it or removed from it. Fontconfig uses mtime of
directory to check cache file aging and hence fails to detect
newly added or recently removed files.

This changeset detects FAT filesystem (currently implemented for
Linux) and adds generating checksum of directory entries instead
of using mtime which guarantees proper cache rebuild.

For non-FAT filesystems this patch adds single syscall per directory
which is negligeable overhead.

This fixes bug https://bugs.freedesktop.org/show_bug.cgi?id=25535

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
12 years agoMove statfs/statvfs wrapper to fcstat.c and add a test for the mtime broken fs
Akira TAGOH [Mon, 28 May 2012 04:59:48 +0000 (13:59 +0900)]
Move statfs/statvfs wrapper to fcstat.c and add a test for the mtime broken fs

just rework to share the efforts between FcIsFsMmapSafe() and FcIsFsMtimeBroken().

12 years agoMove FcStat to separate compilation unit
Mikhail Gusarov [Sun, 29 Apr 2012 10:56:16 +0000 (12:56 +0200)]
Move FcStat to separate compilation unit

FcStat() logic is quite complicated in presence of various semi-broken operating
systems and filesystems, split it out in order to make it a bit easier.

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
12 years agofcatomic: fallback to create a directory with FcAtomicLock
Akira TAGOH [Mon, 28 May 2012 06:58:56 +0000 (15:58 +0900)]
fcatomic: fallback to create a directory with FcAtomicLock

link(2) might be failed on the filesystem that doesn't support
the hard link. e.g. FcAtomicLock() always fails on FAT filesystem
when link(2) is available.
So that may be a good idea to fallback if link(2) is failed.

12 years agoBug 33644 - Fontconfig doesn't match correctly in <test>
Akira TAGOH [Mon, 21 May 2012 04:43:20 +0000 (13:43 +0900)]
Bug 33644 - Fontconfig doesn't match correctly in <test>

Warn if the multiple values is set to <test>, including the case of
in <alias> because the behavior isn't intuitive since so many users
is asking for a help to get things working for their expectation.

Use multiple <match>s or <alias>es for OR operator and
multiple <test>s for AND operator.

12 years agoCorrect the example
Akira TAGOH [Mon, 21 May 2012 04:37:54 +0000 (13:37 +0900)]
Correct the example

Enclose the string with <string> in <test>

12 years agoBug 20411 - fontconfig doesn't match FreeDesktop directories specs
Akira TAGOH [Mon, 12 Mar 2012 10:18:19 +0000 (19:18 +0900)]
Bug 20411 - fontconfig doesn't match FreeDesktop directories specs

Allows reading configuration files, fonts and cache files from
the directories where the XDG Base Directory Specification defines.

the old directories are still in the configuration files for
the backward compatibility.