Patrick Lam [Tue, 29 Nov 2005 14:57:10 +0000 (14:57 +0000)]
Refactor FcCacheBankToIndex into an inlineable part (in fcint.h) which
checks the front of the list and a non-inlineable part which finds and
moves the appropriate element to the front of the list.
reviewed by: plam
Patrick Lam [Tue, 29 Nov 2005 06:23:00 +0000 (06:23 +0000)]
Make the perf guys hate me a bit less: hoist the directory-name
FcConfigAcceptFont check for cached fonts up to directory cache read
time, rather than running it for each font.
Patrick Lam [Tue, 29 Nov 2005 06:09:18 +0000 (06:09 +0000)]
Don't make FcPatternFindFullFname available to fccfg, it's not really safe.
Instead go through FcPatternGetString (sorry, perf guys.) Also, use
globs for dirs as well.
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.
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.
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
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
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
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
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
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
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
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).
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
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.
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.
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!
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.
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:
----------------------------------------------------------------------
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.
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
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.
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.
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).
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>
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!
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.
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.