Commit Graph

77 Commits

Author SHA1 Message Date
Patrick Lam 83b6739035 Improve error message when fc-cache can't write the cache. Add missing
slash. Reported by Behdad. Incorporate Behdad's patch to create
    /var/cache/fontconfig when appropriate.
2005-12-12 13:46:45 +00:00
Patrick Lam 303bcf9b9d Revert the previous patch and commit the correct patch: I forgot a
canonicalization in FcValueListSerialize, so that it would choke on
    already-serialized input files. Duh!
2005-11-02 07:37:00 +00:00
Patrick Lam c6b75577f3 Forcibly rescan a directory before writing a fresh local cache file for
that directory, fixing the losing-fonts problem reported by Mike Fabian
    and also apparently the font cache file corruption.
2005-11-02 07:01:25 +00:00
Patrick Lam 55c8fa4f08 Add new API which unlinks directory caches and checks dir caches for
existence of appropriate sections. Fix fc-cache to unlink stale cache
    files and save directory caches that lack relevant sections.
2005-10-05 00:34:52 +00:00
Patrick Lam f28f090d25 Add new command-line utility, fc-cat, to convert fonts.cache-2 files into
fonts.cache-1 files (e.g. for grepping and validation of the mmap
    codepath), as per James Cloos' request.
Remove done 'TODO' comment.
Updates for development release 2.3.90.
2005-09-23 05:59:19 +00:00
Patrick Lam 2304e38f9b :
Save subdirectory names in cache files to save time. This completely
    restores the original fontconfig API, BTW. Note that directories
    without fonts don't get a cache file; but then how many files would it
    have in that directory...
2005-09-01 06:14:46 +00:00
Patrick Lam 5e678e9459 Only load requested fonts for fc-cache, and cleanup memory handling:
*Serialize no longer mutates original FcPatterns, it creates a new copy
    in the supplied buffer. Fix thinkos in global cache freeing and in
    FcCacheSkipToArch.
2005-08-31 15:12:41 +00:00
Patrick Lam eb0cf67144 src/fcint.c
The global cache now uses the same mmap-based cache infrastructure as the
    per-directory caches. Furthermore, the global cache is automatically
    updated (if possible) whenever fontconfig is used. Rip out remnants of
    the old cache infrastructure.
2005-08-30 05:55:13 +00:00
Patrick Lam 4262e0b385 Overhaul the serialization system to create one mmapable file per directory
and distribute bytes for each directory from a single malloc for that
    directory. Store pointers as differences between the data pointed to
    and the pointer's address (s_off = s - v). Don't serialize data
    structures that never actually get serialized. Separate strings used
    for keys from strings used for values (in FcPatternElt and FcValue,
    respectively). Bump FC_CACHE_VERSION to 2.
2005-08-24 06:21:30 +00:00
Patrick Lam 212c9f437e #ifdef out old cache stuff, replace with first version of new mmapping
cache. Add *Read and *Write procedures which mmap in and write out the
    fontconfig data structures to disk. Currently, create cache in /tmp,
    with different sections for each architecture (as returned by uname's
    .machine field. Run the fc-cache binary to create a new cache file;
    fontconfig then uses this cache file on subsequent runs, saving lots of
    memory. Also fixes a few bugs and leaks.
2005-07-25 04:10:09 +00:00
Keith Packard 5c1853cd4c Bump so revision for 2.3.2
Fix a few minor leaks in error cases.
2005-04-27 16:22:46 +00:00
Keith Packard 716ac8b803 Don't force bitmap font enable in default configuration; allows users to
override this in ~/.fonts.conf
Updated translations
Destroy font configuration on exit to help valgrind
Use own transcoding routines in preference to iconv which appears to have
    leaks in some translators. Call iconv_close after using iconv (oops).
Prefer unicode encoding of Euro char as some fonts mis-encode Euro in other
    ones.
Must fetch bitmap glyphs to get width values to check for
    monospace/dual-width fonts.
2005-04-21 19:03:53 +00:00
Keith Packard 46b51147d1 Change files from ISO-Latin-1 to UTF-8 2004-12-07 01:14:46 +00:00
Keith Packard 54560b013f Sleep for two seconds before exiting to make sure timestamps for future
changes have distinct mod times in the file system. Bug #1982.
Add Punjabi orthography. Bug #1671.
reviewed by: Keith Packard <keithp@keithp.com>
2004-12-05 06:19:46 +00:00
Keith Packard 86b1243193 (Bug 87) Automake 1.4 doesn't do man_MAN1 correctly (Bug 88) Fix usage info
on non-long option systems (Tim Mooney)
2003-05-31 14:58:41 +00:00
Keith Packard 4bd4418ab5 Change RCS tag 2003-03-05 05:51:27 +00:00
Keith Packard ff3f1f98ed Switch back to -version-info for fontconfig as its at minor 0. Add
--system-only to fc-cache. Fix FC_VERSION to match product version
    rather than .so version
2003-03-02 19:12:23 +00:00
Keith Packard 565a919e80 Have fc-cache skip directories without write access 2003-02-12 20:35:32 +00:00
Marc Aurele La France d1bec8c66d Pacify gcc 3.2 2002-09-18 17:11:46 +00:00
Keith Packard 5d43e79919 Make missing font directory messages only displayed when verbose 2002-08-13 02:06:22 +00:00
Keith Packard 80a7d66439 Help message said -v was for --force 2002-08-11 15:09:33 +00:00
Keith Packard ad07dcf486 Make fc-cache avoid reading the whole world full of fonts 2002-07-01 05:11:20 +00:00
Keith Packard 0c35c0facb Make fc-cache more tolerant of missing font directories 2002-06-19 20:55:19 +00:00
Keith Packard 179c39959c Fix autoconf build process for fontconfig 2002-05-21 17:06:22 +00:00
Marc Aurele La France c4bd0638c5 Warning fixes 2002-02-26 05:10:30 +00:00
Keith Packard 65018b4a46 Update to Xft version 2 2002-02-15 07:36:14 +00:00
Keith Packard 24330d27f8 Initial revision 2002-02-14 23:34:13 +00:00