Commit Graph

129 Commits

Author SHA1 Message Date
Akira TAGOH 3c55ef4b27 missing an open parenthesis 2017-11-08 22:03:49 +09:00
Akira TAGOH 9a0fcb948f Add the ruleset description support
Trying to address what these configuration files really do.
This change allows to see the short description that mention
the purpose of the content in the config file and obtain
them through API.

This change also encourage one who want to make some UI for
the user-specific configuration management. it is the main
purpose of this change for me though.

Aside from that, I've also made programs translatable. so
we see more dependencies on the build time for gettext,
and itstool to generate PO from xml.
2017-11-07 15:24:54 +09:00
Akira TAGOH ad9f588050 Fix the broken cache more.
Take a look at the nano second in the mtime to figure out
if the cache needs to be updated if available.
and do the mutex lock between scanning and writing a cache
to avoid the conflict.

Also we don't need to scan directories again after writing
caches. so getting rid of the related code as well.

https://bugs.freedesktop.org/show_bug.cgi?id=69845

and for reference:

https://bugzilla.redhat.com/show_bug.cgi?id=1236034
2015-08-14 17:19:29 +09:00
Akira TAGOH 78ed920e2b Fix a typo in docs 2015-01-19 19:48:50 +09:00
Akira TAGOH 456937cd15 fc-cache: Add an option to raise an error if no fonts found
and get back the behavior.
2014-12-24 18:53:41 +09:00
Akira TAGOH db64c71408 fc-cache: make a fail if no fonts processed on a given path 2014-12-16 20:43:02 +09:00
Akira TAGOH d17f556153 Read the config files and fonts on the sysroot when --sysroot is given to fc-cache
Fix for e96d776088

https://bugs.freedesktop.org/show_bug.cgi?id=59456
2014-06-17 20:11:02 +09:00
Akira TAGOH f44157c809 Fix fc-cache fail with -r
Do not unlink the cache even if --really-force is given.
because re-scanning process expects the cache exists.

https://bugs.freedesktop.org/show_bug.cgi?id=77252
2014-04-10 19:27:55 +09:00
Akira TAGOH 7a6622f25c Improve the performance issue on rescanning directories 2013-12-20 11:57:16 +09:00
Ross Burton a5fd7912ff fc-cache: --sysroot option takes an argument
The getopt_long option definitions say that sysroot doesn't take an argument,
when it in fact does.

Signed-off-by: Ross Burton <ross.burton@intel.com>
2013-11-28 15:27:04 +09:00
Akira TAGOH a4443e64c8 Re-scan font directories only when it contains subdirs
Somewhat improves the performance but still need to think about for the situation
where both directories and fonts are in.
2013-11-05 20:30:35 +09:00
Akira TAGOH 0203055520 Workaround the race condition issue on updating cache 2013-10-02 16:34:34 +09:00
Sebastian Freundt 18bf57c70a build-chain, replace INCLUDES directive by AM_CPPFLAGS
As of automake-13.1 the INCLUDES directive is no longer supported.
An automake run will return with an error.

This changeset simply follows automake's advice to replace INCLUDES
by AM_CPPFLAGS.
2013-04-08 11:40:58 +09:00
Akira TAGOH e96d776088 Bug 59456 - Adding a --sysroot like option to fc-cache
Add an ability to set the system root to generate the caches.
In order to do this, new APIs, FcConfigGetSysRoot() and
FcConfigSetSysRoot() is available.
2013-03-05 18:38:50 +09:00
Behdad Esfahbod ed41b23765 Switch .gitignore to git.mk 2013-01-02 00:36:12 -06:00
Akira TAGOH 36265aeebd Remove the dead code 2012-12-11 11:37:23 +09:00
Akira TAGOH 038aa930ae Use automake variable instead of cleaning files in clean-local
just for git.mk coming up from Behdad's threadsafe branch
2012-10-26 14:31:23 +09:00
Akira TAGOH 06d6b7c312 Create CACHEDIR.TAG when fc-cache is run or only when the cache directory is created at the runtime.
Also add FcCacheCreateTagFile() API to do create CACHEDIR.TAG on the cache
directory.
2012-04-23 11:26:32 +09:00
Akira TAGOH dd2a3d3520 Bug 25151 - Move cleanCacheDirectory() from fc-cache.c into
the library

Add FcDirCacheScan() API to clean up the cache files in the directory.
2012-04-18 12:55:23 +09:00
Akira TAGOH 1db3e9cdd8 fc-cache: improvement of the fix for Bug#39914.
Use sizeof() instead of strlen() and use stdio.
2012-03-22 12:36:34 +09:00
Akira TAGOH 4f7f3bf9f7 Bug 39914 - Please tag the cache directory with CACHEDIR.TAG
fc-cache: Create CACHEDIR.TAG at the top of the cache directory.

Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2012-03-21 16:06:37 +09:00
Jeremy Huddleston 8cc4498122 fcarch: Check for architecture signature at compile time rather than configure time
https://bugs.freedesktop.org/show_bug.cgi?id=20208

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-03-21 11:59:01 +09:00
Akira TAGOH 93460f93e9 Fix a build issue due to the use of non-portable variables
$< isn't supported in BSD make say. $(RM) is pre-defined in GNU make
though, not in BSD make say. so changed to check on configure if it's
pre-defined by make, otherwise set the appropriate command to $(RM).

This would be a workaround until it has the certain pre-defined value.
2012-03-16 16:34:37 +09:00
Akira TAGOH a5b609196f Revert "Fix a build fail on some environment."
This reverts commit 0fdfddf2ac.

Conflicts:

	doc/Makefile.am
2012-03-16 11:55:30 +09:00
Akira TAGOH 0fdfddf2ac Fix a build fail on some environment. 2012-03-10 23:30:30 +09:00
Behdad Esfahbod d1a0fca316 Make fc-arch stuff cross-compiling-safe
Fixes:
Bug 32679 - fontconfig-2.8.0 does not cross compile
Bug 25462 - Cross-compilation doesn't work
2010-12-28 01:22:34 -06:00
Behdad Esfahbod 5aaf466d38 Cleanup copyright notices to replace "Keith Packard" with "the author(s)" 2010-11-10 16:45:42 -05:00
Behdad Esfahbod ba7b50ab33 Add fc-pattern cmdline tool 2010-04-20 23:18:00 -04:00
Behdad Esfahbod 111e5b6d69 Bug 25152 Don't sleep(2) if all caches were uptodate 2010-02-26 01:47:56 -05:00
Behdad Esfahbod 38bd85b83b [fc-cache] Document -r argument in man page 2009-11-20 18:44:04 -05:00
Behdad Esfahbod 35c5181151 [fc-cache] Remove obsolete sentence from man page 2009-06-24 13:52:10 -04:00
Behdad Esfahbod 3074a73b41 Replace 'KEITH PACKARD' with 'THE AUTHOR(S)' in license text in all files 2009-03-13 17:59:28 -04:00
Behdad Esfahbod 98d765a53b Cleanup all manpage.* files
Recent doc2man generates files called manpage.log.  This was breaking build.
2009-02-13 16:55:08 -08:00
Behdad Esfahbod 6bffe1a95b Add fc-scan too that runs FcFileScan/FcDirScan
This is quite similar to fc-query, but calling FcFileScan/FcDirScan instead
of FcFreeTypeQuery.
2009-02-13 16:54:06 -08:00
Behdad Esfahbod 1439c8f21a Handle -h and --help according to GNU Coding Standards (#17104)
Added -h instead of -?.  And upon -h and --help, write usave to stdout
instead of stdin, and return 0 instead of 1.

-? still works like before as that's what getopt returns upon unknown
arguments.
2009-02-13 16:53:59 -08:00
Behdad Esfahbod e690fbb20e Get rid of $Id$ tags 2009-02-13 16:53:57 -08:00
Behdad Esfahbod 77c0d8bce8 Add fc-query (#13019) 2009-02-13 16:53:56 -08:00
Behdad Esfahbod d5b6085c3e Update man pages 2009-02-13 16:53:56 -08:00
Behdad Esfahbod 317b849215 Replace RCS Id tags with the file name 2009-02-13 16:53:55 -08:00
Keith Packard c6c9400d67 Call FcFini to make memory debugging easier
FcFini frees all libary data structures so valgrind should report 0
allocations in use when the program exits.
2008-05-04 01:25:04 -07:00
Eric Anholt ba88459913 Fix build with !ENABLE_DOCS and no built manpages. 2008-04-18 11:52:41 -07:00
Keith Packard 32fed45727 Eliminate references to freetype from utility Makefile.am's
The utility programs don't use any freetype interfaces, so they
don't need to directly refer to freetype headers or libraries.
2008-01-08 12:34:19 -08:00
Tor Lillqvist 8a3dc4880c Workaround for stat() brokenness in Microsoft's C library (bug 8526)
Fix a couple of longstanding problems with fontconfig on Windows that
manifest themselves especially in GIMP. The root cause to the problems is in
Microsoft's incredibly stupid stat() implementation. Basically, stat()
returns wrong timestamp fields for files on NTFS filesystems on machines
that use automatic DST switching.

See for instance http://bugzilla.gnome.org/show_bug.cgi?id=154968 and
http://www.codeproject.com/datetime/dstbugs.asp

As fccache.c now looks at more fields in the stat struct I fill in them all.
I noticed that fstat() is used only on a fd just after opening it, so on
Win32 I just call my stat() replacement before opening instead...
Implementing a good replacement for fstat() would be harder because the code
in fccache.c wants to compare inode numbers. There are no (readily
accessible) inode numbers on Win32, so I fake it with the hash of the full
file name, in the case as it is on disk. And fstat() doesn't know the full
file name, so it would be rather hard to come up with a inode number to
identify the file.

The patch also adds similar handling for the cache directory as for the fonts
directory: If a cachedir element in fonts.conf contains the magic string
"WINDOWSTEMPDIR_FONTCONFIG_CACHE" it is replaced at runtime with a path under
the machine's (or user's) temp folder as returned by GetTempPath(). I don't
want to hardcode any pathnames in a fonts.conf intended to be distributed to
end-users, most of which who wouldn't know how to edit it anyway. And
requiring an installer to edit it gets complicated.
2007-11-13 16:41:55 -08:00
Keith Packard 9b84ecff92 Don't check cache file time stamps when cleaning cache dir.
Cache file mtime is meaningless now that the directory time is encoded in
the cache.
2007-11-03 21:57:51 -07:00
Keith Packard 43d0454597 Distribute man source files for command line programs (bug 9678).
For systems on whch DOCBOOK is unavailable, distribute command line program
manual pages in .man format.
2007-10-25 01:26:09 -07:00
Keith Packard 2a3e3c442d Have fc-cache remove invalid cache files from cache directories.
Old cache file versions, or corrupted cache files should be removed when
cleaning cache directories with fc-cache. This only affects filenames which
match the fontconfig cache file format, so other files will be left alone.
2007-10-18 05:07:29 -07:00
Keith Packard 238489030a Don't use X_OK bit when checking for writable directories (bug 12438)
Some mingw versions have broken X_OK checking; instead of trying to work
around this in a system-depedent manner, simply don't bother checking for
X_OK along with W_OK as such cases are expected to be mistakes, and not
sensible access control.
2007-10-18 05:04:39 -07:00
Keith Packard 2b0d3d8af5 Verbose message about cleaning directories was imprecise
Non-existent directories are now described as 'non-existent' instead of
'unwritable'.
2007-10-18 05:01:41 -07:00
Keith Packard 50124d1e48 Improve verbose messages from fc-cache.
fc-cache would say 'skipping: %d fonts, %d dirs' or 'caching: %d fonts, %d
dirs', which could easily mislead the user. Add 'existing cache is valid' or
'new cache contents' to these messages to explain what it is doing.
2007-10-18 04:58:31 -07:00
Keith Packard e12f718f65 Remove unneeded call to access(2) in fc-cache.
This call was followed by a call to stat(2) which provided the necessary
information. This call to access(2) was necessary when cache files were
stored in the font directory as that would check for write permission
correctly.
2007-10-18 04:54:51 -07:00