]> git.wh0rd.org - fontconfig.git/log
fontconfig.git
18 years agoStephan Kulow <coolo@suse.de> reviewed by: plam
Patrick Lam [Mon, 28 Nov 2005 10:54:11 +0000 (10:54 +0000)] 
Stephan Kulow <coolo@suse.de> reviewed by: plam
Don't kill all fonts during match (oops!)

18 years agoStephan Kulow <coolo@suse.de> Michael Matz <matz@suse.de> reviewed by: plam
Patrick Lam [Mon, 28 Nov 2005 01:40:53 +0000 (01:40 +0000)] 
Stephan Kulow <coolo@suse.de> Michael Matz <matz@suse.de> reviewed by: plam
Rewrite FcFontSetMatch to a path-finding based algorithm, i.e. inline
    FcCompare into FcFontSetMatch and reorder the loops, adding a boolean
    array which blocks patterns from future consideration if they're known
    to not be best on some past criterion.

18 years agoFix incorrect merge.
Patrick Lam [Sat, 26 Nov 2005 05:05:14 +0000 (05:05 +0000)] 
Fix incorrect merge.
reviewed by: plam

18 years agoDon't do random matching when bad objects are passed into
Patrick Lam [Fri, 25 Nov 2005 16:33:58 +0000 (16:33 +0000)] 
Don't do random matching when bad objects are passed into
    FcCompareValueList.

18 years agoRename fcpatterns, fcpatternelts, fcvaluelists to _fcPatterns,
Patrick Lam [Fri, 25 Nov 2005 16:04:44 +0000 (16:04 +0000)] 
Rename fcpatterns, fcpatternelts, fcvaluelists to _fcPatterns,
    _fcPatternElts, _fcValueLists for consistency.

18 years agoPass the FcObjectPtr to FcCompareValueList, not the char * (perf).
Patrick Lam [Fri, 25 Nov 2005 15:54:24 +0000 (15:54 +0000)] 
Pass the FcObjectPtr to FcCompareValueList, not the char * (perf).
reviewed by: plam

18 years agoPass around FcCache *s to the Unserialize functions for extra consistency
Patrick Lam [Fri, 25 Nov 2005 15:50:34 +0000 (15:50 +0000)] 
Pass around FcCache *s to the Unserialize functions for extra consistency
    (and less overhead, for what that's worth).

18 years agoInline the *PtrU functions to gain perf. Remove unneeded params for the
Patrick Lam [Fri, 25 Nov 2005 03:00:51 +0000 (03:00 +0000)] 
Inline the *PtrU functions to gain perf. Remove unneeded params for the
    FcCompare* functions.
reviewed by: plam

18 years agoFix the debian changelog so that debian/rules works again, make it create a
Patrick Lam [Fri, 25 Nov 2005 02:16:42 +0000 (02:16 +0000)] 
Fix the debian changelog so that debian/rules works again, make it create a
    debian package for release 2.3.92-1. Acknowledge change in NMU of
    debian package.

18 years agoMove FC_BANK_DYNAMIC, FC_BANK_FIRST to internal header.
Patrick Lam [Thu, 24 Nov 2005 21:40:20 +0000 (21:40 +0000)] 
Move FC_BANK_DYNAMIC, FC_BANK_FIRST to internal header.
Check for type validity during FcPatternAddWithBinding, don't verify type
    in FcFontMatch, don't call FcCanonicalize here (which always does a
    deep copy).
reviewed by: plam

18 years agoMake FcCompareString and FcCompareFamily less expensive. Only add a value
Patrick Lam [Thu, 24 Nov 2005 20:20:26 +0000 (20:20 +0000)] 
Make FcCompareString and FcCompareFamily less expensive. Only add a value
    for FC_FAMILY if the proposed value is a string.
reviewed by: plam

18 years agoInline FcDebug invocations and only initialize once, in FcInit*. Improve
Patrick Lam [Thu, 24 Nov 2005 19:38:05 +0000 (19:38 +0000)] 
Inline FcDebug invocations and only initialize once, in FcInit*. Improve
    debug msg in FcPatternPrint.
reviewed by: plam

18 years agoProperly apply fcrozat's patch.
Patrick Lam [Wed, 23 Nov 2005 17:01:27 +0000 (17:01 +0000)] 
Properly apply fcrozat's patch.

18 years ago2005-11-23 Frederic Crozat <fcrozat@mandriva.com>: reviewed by: plam
Patrick Lam [Wed, 23 Nov 2005 16:36:26 +0000 (16:36 +0000)] 
2005-11-23 Frederic Crozat <fcrozat@mandriva.com>: reviewed by: plam
Minor code warning cleanups.

18 years ago2005-11-23 Frederic Crozat <fcrozat@mandriva.com>: reviewed by: plam
Patrick Lam [Wed, 23 Nov 2005 15:32:36 +0000 (15:32 +0000)] 
2005-11-23 Frederic Crozat <fcrozat@mandriva.com>: reviewed by: plam
Make getopt_long accept -s parameter to fc-match as well.

18 years agoManually perform inlining & partial redundancy elimination to reduce calls
Patrick Lam [Tue, 22 Nov 2005 04:46:55 +0000 (04:46 +0000)] 
Manually perform inlining & partial redundancy elimination to reduce calls
    to FcValueListPtrU.
Only invoke strlen() when really necessary.
reviewed by: plam
reviewed by: plam

18 years agoGet rid of the use of freetype internal headers in fcfreetype.c, since
Patrick Lam [Sat, 19 Nov 2005 22:38:39 +0000 (22:38 +0000)] 
Get rid of the use of freetype internal headers in fcfreetype.c, since
    those headers will go away with freetype 2.2. Replace with public
    domain ftglue code from pango. Note that the patch removes some extra
    error checking in FT_Get_BDF_Property() and comments out the skipping
    of empty pcf fonts.
reviewed by: plam

18 years agoGet rid of the use of freetype internal headers in fcfreetype.c, since
Patrick Lam [Sat, 19 Nov 2005 22:37:24 +0000 (22:37 +0000)] 
Get rid of the use of freetype internal headers in fcfreetype.c, since
    those headers will go away with freetype 2.2. Replace with public
    domain ftglue code from pango. Note that the patch removes some extra
    error checking in FT_Get_BDF_Property() and comments out the skipping
    of empty pcf fonts.
reviewed by: plam

18 years agoGet rid of the use of freetype internal headers in fcfreetype.c, since
Patrick Lam [Sat, 19 Nov 2005 22:32:13 +0000 (22:32 +0000)] 
Get rid of the use of freetype internal headers in fcfreetype.c, since
    those headers will go away with freetype 2.2. Replace with public
    domain ftglue code from pango. Note that the patch removes some extra
    error checking in FT_Get_BDF_Property() and comments out the skipping
    of empty pcf fonts.
reviewed by: plam

18 years agoFurther fix of patch from 2005-11-04: miscounted numbers count
Patrick Lam [Sat, 19 Nov 2005 16:24:53 +0000 (16:24 +0000)] 
Further fix of patch from 2005-11-04: miscounted numbers count
    (numbers_count); didn't strip duplicate numbers (langBankNumbers); and
    leafidx_offset and numbers_offset in fcLangCharSets are wrong.
Removed leafidx_count and numbers_count since they are the same and
    replaced them with offset_count.
reviewed by: plam

18 years agoDon't crash when fc-cat invoked with no arguments.
Patrick Lam [Fri, 18 Nov 2005 20:32:30 +0000 (20:32 +0000)] 
Don't crash when fc-cat invoked with no arguments.
Fix invalid read access caused by premature free and GCC4 warnings in
    libxml2 codepath.
reviewed by: plam
reviewed by: plam

18 years agoList iteration not needed in FcConfigValues, since it's building up the
Patrick Lam [Fri, 18 Nov 2005 04:21:10 +0000 (04:21 +0000)] 
List iteration not needed in FcConfigValues, since it's building up the
    list itself; we can just strip FcVoid elements during construction.
reviewed by: plam

18 years agoFix crash on invalid constants in config files (forgot to update a pointer
Patrick Lam [Thu, 17 Nov 2005 16:46:07 +0000 (16:46 +0000)] 
Fix crash on invalid constants in config files (forgot to update a pointer
    upon list iteration.)

18 years agoComplain about invalid constants in config files.
Patrick Lam [Thu, 17 Nov 2005 16:17:05 +0000 (16:17 +0000)] 
Complain about invalid constants in config files.
reviewed by: plam

18 years agoDon't add current_arch_start more than once.
Patrick Lam [Thu, 17 Nov 2005 15:43:39 +0000 (15:43 +0000)] 
Don't add current_arch_start more than once.
Fix ordering of ALIGN with respect to saving block_ptr; add another ALIGN
    to fcfs.c.
reviewed by: plam

18 years agosrc/fccache.c (FcDirCacheProduce)
Patrick Lam [Wed, 16 Nov 2005 17:49:01 +0000 (17:49 +0000)] 
src/fccache.c (FcDirCacheProduce)
Fix case where alignment bytes bumped up metadata->count causing
    unwarranted failures to write cache files. (Reported by Stephan Kulow).

18 years agoAdd *NeededBytesAlign(), which overestimates the padding which is later
Patrick Lam [Wed, 16 Nov 2005 15:55:17 +0000 (15:55 +0000)] 
Add *NeededBytesAlign(), which overestimates the padding which is later
    added by the new ALIGN macro. Fix alignment problems on ia64 and s390
    by bumping up block_ptr appropriately. (Earlier version by Andreas
    Schwab).
Use sysconf to determine proper PAGESIZE value; this appears to be
    POSIX-compliant. (reported by Andreas Schwab)
reviewed by: plam

18 years agoFix bug 2878 (excessive relocations at startup for charsets, reported by
Patrick Lam [Fri, 4 Nov 2005 19:31:26 +0000 (19:31 +0000)] 
Fix bug 2878 (excessive relocations at startup for charsets, reported by
    Ross Burton): fc-lang/fc-lang now creates the static form of the
    langset, not the dynamic form, so that the charsets should now be in
    .rodata.

18 years agoAdd test for validity of directory caches that somehow got lost (reported fc-2_3_92
Patrick Lam [Fri, 4 Nov 2005 16:48:32 +0000 (16:48 +0000)] 
Add test for validity of directory caches that somehow got lost (reported
    by make distcheck).

18 years agoBump version to 2.3.92.
Patrick Lam [Fri, 4 Nov 2005 06:17:00 +0000 (06:17 +0000)] 
Bump version to 2.3.92.

18 years agoFix argument ordering problem in call to FcPatternTransferFullFname.
Patrick Lam [Thu, 3 Nov 2005 04:45:57 +0000 (04:45 +0000)] 
Fix argument ordering problem in call to FcPatternTransferFullFname.

18 years agoFix warnings and embarrassing double-free error.
Patrick Lam [Thu, 3 Nov 2005 04:23:22 +0000 (04:23 +0000)] 
Fix warnings and embarrassing double-free error.

18 years agoChange the rule for artificial emboldening in fonts.conf.in. This enables
Patrick Lam [Wed, 2 Nov 2005 15:57:36 +0000 (15:57 +0000)] 
Change the rule for artificial emboldening in fonts.conf.in. This enables
    the support for artificial emboldening included in cairo.
reviewed by: plam

18 years agoDon't zero out full names for FC_REF_CONSTANT fonts; also, duplicate full
Patrick Lam [Wed, 2 Nov 2005 15:29:53 +0000 (15:29 +0000)] 
Don't zero out full names for FC_REF_CONSTANT fonts; also, duplicate full
    names when transferring, and free full names when freeing the
    associated font. Reported by Jinghua Luo.

18 years agoRevert the previous patch and commit the correct patch: I forgot a
Patrick Lam [Wed, 2 Nov 2005 07:37:00 +0000 (07:37 +0000)] 
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!

18 years agoForcibly rescan a directory before writing a fresh local cache file for
Patrick Lam [Wed, 2 Nov 2005 07:01:25 +0000 (07:01 +0000)] 
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.

18 years agoFix thinko: actually, the whole global cache is stale if the global cache
Patrick Lam [Wed, 2 Nov 2005 06:39:23 +0000 (06:39 +0000)] 
Fix thinko: actually, the whole global cache is stale if the global cache
    is older than the (newest) config file.

18 years agoDeclare the global cache of a directory's contents to be stale if the
Patrick Lam [Wed, 2 Nov 2005 06:29:14 +0000 (06:29 +0000)] 
Declare the global cache of a directory's contents to be stale if the
    directory is newer than the (newest) configuration file. S:
    ----------------------------------------------------------------------

18 years agoCopy the full pathname whenever duplicating an FcPattern; otherwise,
Patrick Lam [Tue, 1 Nov 2005 06:57:25 +0000 (06:57 +0000)] 
Copy the full pathname whenever duplicating an FcPattern; otherwise,
    applications continue breaking.

18 years agoFix small memory error (tried to free argv); use basename and dirname
Patrick Lam [Tue, 1 Nov 2005 05:52:28 +0000 (05:52 +0000)] 
Fix small memory error (tried to free argv); use basename and dirname
    correctly (they can modify their arguments).

18 years agoReinstate basename patch, but keep a hash table linking FcPatterns to their
Patrick Lam [Tue, 1 Nov 2005 05:26:27 +0000 (05:26 +0000)] 
Reinstate basename patch, but keep a hash table linking FcPatterns to their
    fully-qualified font names for clients' benefit. Clients only pay for
    the font names once they request the FC_FILE property from an
    FcPattern, but the font name is malloc'd at that point (i.e. not
    mmapped: that's impossible, since it may vary between machines.)
    Clients do have to pay for a copy of the path name per cache file.
Note that FcPatternGetString now does some rewriting if you ask for an
    FC_FILE, appending the pathname as appropriate.

18 years agoRevert basename patch, which breaks fontconfig clients on my system.
Patrick Lam [Mon, 31 Oct 2005 06:02:00 +0000 (06:02 +0000)] 
Revert basename patch, which breaks fontconfig clients on my system.

18 years agoAdd FC_EMBEDDED_BITMAP object type to tell Xft/Cairo whether to load
Patrick Lam [Wed, 26 Oct 2005 06:34:29 +0000 (06:34 +0000)] 
Add FC_EMBEDDED_BITMAP object type to tell Xft/Cairo whether to load
    embedded bitmaps or not.
reviewed by: plam

18 years agoOnly add basename to patterns' FC_FILE element, not any part of the
Patrick Lam [Tue, 25 Oct 2005 22:29:13 +0000 (22:29 +0000)] 
Only add basename to patterns' FC_FILE element, not any part of the
    dirname.

18 years agoAdd some more consts, fixing more GCC4 warnings.
Patrick Lam [Sat, 22 Oct 2005 15:12:05 +0000 (15:12 +0000)] 
Add some more consts, fixing more GCC4 warnings.

18 years agoSupport localized font family and style names. This has been reported to
Patrick Lam [Sat, 22 Oct 2005 14:21:14 +0000 (14:21 +0000)] 
Support localized font family and style names. This has been reported to
    break old apps like xfd, but modern (gtk+/qt/mozilla) apps work fine.
reviewed by: plam

18 years agoDestroy the global cache file if it's terminally broken. (reported by Mike
Patrick Lam [Fri, 21 Oct 2005 20:24:30 +0000 (20:24 +0000)] 
Destroy the global cache file if it's terminally broken. (reported by Mike
    Fabian)

18 years agoPrevent fc-list from escaping strings when printing them.
Patrick Lam [Fri, 21 Oct 2005 19:47:43 +0000 (19:47 +0000)] 
Prevent fc-list from escaping strings when printing them.

18 years agoAdd valist sentinel markup for FcObjectSetBuild and FcPatternBuild.
Patrick Lam [Thu, 20 Oct 2005 20:50:21 +0000 (20:50 +0000)] 
Add valist sentinel markup for FcObjectSetBuild and FcPatternBuild.
reviewed by: plam

18 years agoAdd consts to variables so as to move arrays into .rodata.
Patrick Lam [Fri, 14 Oct 2005 21:02:31 +0000 (21:02 +0000)] 
Add consts to variables so as to move arrays into .rodata.
reviewed by: plam

18 years agoCheck existence of directory cache file before attempting to unlink.
Patrick Lam [Fri, 14 Oct 2005 20:56:27 +0000 (20:56 +0000)] 
Check existence of directory cache file before attempting to unlink.
reviewed by: plam

18 years agoFix flipped return value on unlink. (Reported by Mike Fabian)
Patrick Lam [Thu, 13 Oct 2005 12:32:14 +0000 (12:32 +0000)] 
Fix flipped return value on unlink. (Reported by Mike Fabian)

18 years agoWhen fc-cache is run without --force, use directory cache files to speed up
Patrick Lam [Wed, 12 Oct 2005 07:55:42 +0000 (07:55 +0000)] 
When fc-cache is run without --force, use directory cache files to speed up
    fc-cache run time.

18 years agoAdd padding to make valgrind and glibc not hate each other when calling
Patrick Lam [Thu, 6 Oct 2005 20:45:25 +0000 (20:45 +0000)] 
Add padding to make valgrind and glibc not hate each other when calling
    strlen().

18 years agoFix typo in manually applying patch.
Patrick Lam [Wed, 5 Oct 2005 21:12:25 +0000 (21:12 +0000)] 
Fix typo in manually applying patch.

18 years agoModify config file to use Greek fonts before Asian fonts with Greek glyphs.
Patrick Lam [Wed, 5 Oct 2005 19:38:40 +0000 (19:38 +0000)] 
Modify config file to use Greek fonts before Asian fonts with Greek glyphs.
reviewed by: plam & keithp

18 years agoUse libtool -no-undefined flag on all platforms.
Patrick Lam [Wed, 5 Oct 2005 19:32:41 +0000 (19:32 +0000)] 
Use libtool -no-undefined flag on all platforms.
reviewed by: plam & keithp

18 years agoImplement move-to-front array for banks (perf regression reported by Ronny
Patrick Lam [Wed, 5 Oct 2005 18:41:55 +0000 (18:41 +0000)] 
Implement move-to-front array for banks (perf regression reported by Ronny
    V. Vindenes).

18 years agoAdd new API which unlinks directory caches and checks dir caches for
Patrick Lam [Wed, 5 Oct 2005 00:34:52 +0000 (00:34 +0000)] 
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.

18 years agoEnsure that a directory cache has the appropriate section before reporting
Patrick Lam [Mon, 3 Oct 2005 19:51:11 +0000 (19:51 +0000)] 
Ensure that a directory cache has the appropriate section before reporting
    that it is valid (reported by Matthias Clasen).

18 years agoBump version number to 2.3.91. fc-2_3_91
Patrick Lam [Sat, 1 Oct 2005 19:18:51 +0000 (19:18 +0000)] 
Bump version number to 2.3.91.

18 years agoUse libxml2 if requested (with --enable-libxml2) or if expat is not
Patrick Lam [Thu, 29 Sep 2005 20:53:30 +0000 (20:53 +0000)] 
Use libxml2 if requested (with --enable-libxml2) or if expat is not
    available.
reviewed by: plam

18 years agoFix multi-arch cache files: compute the position for the block to be added
Patrick Lam [Thu, 29 Sep 2005 05:14:04 +0000 (05:14 +0000)] 
Fix multi-arch cache files: compute the position for the block to be added
    using info from OrigFile, not NewFile.

18 years agoCast results of sizeof() to unsigned int to get rid of warnings on x86_64
Patrick Lam [Wed, 28 Sep 2005 16:21:14 +0000 (16:21 +0000)] 
Cast results of sizeof() to unsigned int to get rid of warnings on x86_64
    (thanks Matthias Clasen).

18 years agoUpdate ChangeLog.
Patrick Lam [Wed, 28 Sep 2005 00:23:39 +0000 (00:23 +0000)] 
Update ChangeLog.

18 years agoUse FcAtomic to rewrite cache files.
Patrick Lam [Wed, 28 Sep 2005 00:23:15 +0000 (00:23 +0000)] 
Use FcAtomic to rewrite cache files.

18 years agoDon't unlink the fonts.cache-2 file even if there's no data to write; just
Patrick Lam [Tue, 27 Sep 2005 15:52:58 +0000 (15:52 +0000)] 
Don't unlink the fonts.cache-2 file even if there's no data to write; just
    write an empty cache file. (thanks Lubos Lunak)

18 years agoAllocate room for the subdirectory names in each directory cache. Thanks to
Patrick Lam [Tue, 27 Sep 2005 05:43:08 +0000 (05:43 +0000)] 
Allocate room for the subdirectory names in each directory cache. Thanks to
    James Cloos for finding and diagnosing this bug!

18 years agoFix .cvsignore file after copying across directories.
Patrick Lam [Tue, 27 Sep 2005 05:26:59 +0000 (05:26 +0000)] 
Fix .cvsignore file after copying across directories.

18 years agoAdd comment about needing docbook-utils to run make distcheck; hope it'll
Patrick Lam [Fri, 23 Sep 2005 21:42:32 +0000 (21:42 +0000)] 
Add comment about needing docbook-utils to run make distcheck; hope it'll
    save pain to others later.

18 years agoUpdate ChangeLog for 2.3.90. fc-2_3_90
Patrick Lam [Fri, 23 Sep 2005 14:41:40 +0000 (14:41 +0000)] 
Update ChangeLog for 2.3.90.

18 years agoAdd new command-line utility, fc-cat, to convert fonts.cache-2 files into
Patrick Lam [Fri, 23 Sep 2005 05:59:19 +0000 (05:59 +0000)] 
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.

18 years agoUpdate documentation -- fc-cache's man page now says that you need to run
Patrick Lam [Fri, 23 Sep 2005 04:09:37 +0000 (04:09 +0000)] 
Update documentation -- fc-cache's man page now says that you need to run
    fc-cache once per cached architecture; add some documentation to the
    FcCache structure.
Make fc-cache write out fonts.cache-2 files for directories with no fonts
    (i.e. only subdirectories).

18 years agoRemove debugging printf (oops).
Patrick Lam [Fri, 23 Sep 2005 02:33:55 +0000 (02:33 +0000)] 
Remove debugging printf (oops).

18 years agoConvert fromcode to char[12] from char *.
Patrick Lam [Fri, 23 Sep 2005 02:08:40 +0000 (02:08 +0000)] 
Convert fromcode to char[12] from char *.

18 years agoSmall patch for output in case where lineno not defined.
Patrick Lam [Fri, 23 Sep 2005 01:48:33 +0000 (01:48 +0000)] 
Small patch for output in case where lineno not defined.

18 years agoFix more gcc4 warnings:
Patrick Lam [Thu, 22 Sep 2005 23:45:53 +0000 (23:45 +0000)] 
Fix more gcc4 warnings:
- Cast sizeof to int, to shut up signedness warnings in comparison.
- Add consts where appropriate.
reviewed by: Patrick Lam <plam@mit.edu>

18 years agoFix bug when clients use FcNameRegisterObjectTypes; fontconfig was
Patrick Lam [Thu, 22 Sep 2005 20:49:24 +0000 (20:49 +0000)] 
Fix bug when clients use FcNameRegisterObjectTypes; fontconfig was
    returning bogus (i.e. duplicate) FcObjectPtr values. Now use negative
    values for dynamic object strings and positive values for built-in and
    FcNameRegisterObjectType strings. Thanks to Matthias Clasen for
    pinpointing this bus!

18 years agoAdd missing FcValueCanonicalize on call to FcPatternAdd.
Patrick Lam [Fri, 16 Sep 2005 04:57:18 +0000 (04:57 +0000)] 
Add missing FcValueCanonicalize on call to FcPatternAdd.

18 years agoRevert ill-advised addition of FC_RENDER. Add strategy for handling objects
Patrick Lam [Thu, 15 Sep 2005 20:36:44 +0000 (20:36 +0000)] 
Revert ill-advised addition of FC_RENDER. Add strategy for handling objects
    that aren't hardcoded into fontconfig, but generated by fontconfig
    clients: keep another array of user-defined objects (indexed after the
    built-in objects).
Fix compilation warning (uninitialized variable).
Add comment.

18 years agoAdd a global binding for the 'render' pattern element used by Xft; the lack
Patrick Lam [Sun, 11 Sep 2005 05:17:28 +0000 (05:17 +0000)] 
Add a global binding for the 'render' pattern element used by Xft; the lack
    of said binding prevented programs from using FcPatterns through Xft.

18 years agoMerge with HEAD and finish the GCC 4 cleanups (no more warnings!)
Patrick Lam [Sun, 11 Sep 2005 02:16:09 +0000 (02:16 +0000)] 
Merge with HEAD and finish the GCC 4 cleanups (no more warnings!)

18 years agoRobustness fixes: check return values from read and lseek; fix
Patrick Lam [Wed, 7 Sep 2005 15:38:46 +0000 (15:38 +0000)] 
Robustness fixes: check return values from read and lseek; fix
    uninitialized variables; ensure progress on FcCacheSkipToArch.

18 years agoReally fix the global cache: make sure we're reading and writing the same
Patrick Lam [Sat, 3 Sep 2005 04:56:56 +0000 (04:56 +0000)] 
Really fix the global cache: make sure we're reading and writing the same
    data format. Also match subdirectories when consuming cache
    information. Also check dates for global cache: a dir is out of date if
    it is newer than the global cache; scan it manually if that's the case.

18 years agoFix addressing in the global cache file, preventing infinite loops. Get rid
Patrick Lam [Fri, 2 Sep 2005 06:16:49 +0000 (06:16 +0000)] 
Fix addressing in the global cache file, preventing infinite loops. Get rid
    of unused variables.

18 years agoApply Matthias Clasen's patch to fix obvious bogosity (i.e. missing
Patrick Lam [Thu, 1 Sep 2005 18:29:28 +0000 (18:29 +0000)] 
Apply Matthias Clasen's patch to fix obvious bogosity (i.e. missing
    FcObjectPtrU).

18 years agoFix embarassing attempt to free a static buffer.
Patrick Lam [Thu, 1 Sep 2005 06:59:44 +0000 (06:59 +0000)] 
Fix embarassing attempt to free a static buffer.

18 years ago:
Patrick Lam [Thu, 1 Sep 2005 06:14:46 +0000 (06:14 +0000)] 
:
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...

18 years agoOnly load requested fonts for fc-cache, and cleanup memory handling:
Patrick Lam [Wed, 31 Aug 2005 15:12:41 +0000 (15:12 +0000)] 
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.

18 years agoFix compilation error exposed with gcc 2.95.
Patrick Lam [Tue, 30 Aug 2005 23:03:42 +0000 (23:03 +0000)] 
Fix compilation error exposed with gcc 2.95.

18 years agosrc/fcint.c
Patrick Lam [Tue, 30 Aug 2005 05:55:13 +0000 (05:55 +0000)] 
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.

18 years agoEmit and verify machine signature (sizeof (stuff) + endianness) in cache
Patrick Lam [Sun, 28 Aug 2005 05:20:23 +0000 (05:20 +0000)] 
Emit and verify machine signature (sizeof (stuff) + endianness) in cache
    files. Fix bugs in FcCacheBankToIndex.

18 years agoReplace FcObjectStaticName by FcStrStaticName. Implement serialization of
Patrick Lam [Sat, 27 Aug 2005 02:34:24 +0000 (02:34 +0000)] 
Replace FcObjectStaticName by FcStrStaticName. Implement serialization of
    'object' table (strings pointed to by FcPatternElt->object and used as
    keys) and loading of object table from cache file if more strings are
    present in cache file than in current version of fontconfig. Hash the
    object table in memory.

18 years agoReinstate the old global cache code. For the forseeable future, it's
Patrick Lam [Thu, 25 Aug 2005 07:38:02 +0000 (07:38 +0000)] 
Reinstate the old global cache code. For the forseeable future, it's
    probably all right to use the global cache as it was previously and
    just store filenames and font info, as long as no mmap cache exists in
    the directory. Of course, if an mmap cache exists, use that instead.
If a directory cache does not exist or is invalid, load the fonts for just
    that directory using the old codepath.
Fix premature free of the FcPatterns belonging to the FcFontSet which we
    create from the mmapped files.

18 years agoOverhaul the serialization system to create one mmapable file per directory
Patrick Lam [Wed, 24 Aug 2005 06:21:30 +0000 (06:21 +0000)] 
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.

18 years ago#ifdef out old cache stuff, replace with first version of new mmapping
Patrick Lam [Mon, 25 Jul 2005 04:10:09 +0000 (04:10 +0000)] 
#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.

18 years agoForward port cworth's patch to branch.
Patrick Lam [Fri, 15 Jul 2005 18:49:12 +0000 (18:49 +0000)] 
Forward port cworth's patch to branch.

18 years agoConvert ObjectPtr from a fat structure to a simple index into an id table;
Patrick Lam [Thu, 7 Jul 2005 12:09:10 +0000 (12:09 +0000)] 
Convert ObjectPtr from a fat structure to a simple index into an id table;
    ids can be positive (for static strings) or negative (for dynamic
    strings). Static strings belong to a single buffer, while dynamic
    strings are independently allocated.

18 years agoAdd functionality to allow fontconfig data structure serialization.
Patrick Lam [Tue, 28 Jun 2005 03:41:02 +0000 (03:41 +0000)] 
Add functionality to allow fontconfig data structure serialization.
This patch allows the fundamental fontconfig data structures to be
    serialized. I've converted everything from FcPattern down to be able to
    use *Ptr objects, which can be either static or dynamic (using a union
    which either contains a pointer or an index) and replaced storage of
    pointers in the heap with the appropriate *Ptr object. I then changed
    all writes of pointers to the heap with a *CreateDynamic call, which
    creates a dynamic Ptr object pointing to the same object as before.
    This way, the fundamental fontconfig semantics should be unchanged; I
    did not have to change external signatures this way, although I did
    change some internal signatures. When given a *Ptr object, just run *U
    to get back to a normal pointer; it gives the right answer regardless
    of whether we're using static or dynamic storage.
I've also implemented a Fc*Serialize call. Calling FcFontSetSerialize
    converts the dynamic FcFontSets contained in the config object to
    static FcFontSets and also converts its dependencies (e.g. everything
    you'd need to write to disk) to static objects. Note that you have to
    call Fc*PrepareSerialize first; this call will count the number of
    objects that actually needs to be allocated, so that we can avoid
    realloc. The Fc*Serialize calls then check the static pointers for
    nullness, and allocate the buffers if necessary. I've tested the
    execution of fc-list and fc-match after Fc*Serialize and they appear to
    work the same way.

18 years agoMake FcOpNotContains use FcStrStr for strings so that it matches semantics
Keith Packard [Fri, 17 Jun 2005 03:01:43 +0000 (03:01 +0000)] 
Make FcOpNotContains use FcStrStr for strings so that it matches semantics
    for !FcOpContains.
reviewed by: keithp