Patrick Lam [Mon, 10 Apr 2006 15:46:34 +0000 (15:46 +0000)]
Fix double free (spotted by Coverity, CID #1965).
Check if pattern is not null before using it (Coverity defect #1883).
Fix memory leak with hash collision (Coverity defect #1829).
Fix memory leak when bail cases (Coverity defect #1828).
Don't leak directory name (Coverity defect #1827).
reviewed by: plam
Patrick Lam [Fri, 7 Apr 2006 17:27:39 +0000 (17:27 +0000)]
Portability fixes for HP-UX (reported by Christoph Bauer). Replace
'__inline__' by AC_C_INLINE and 'inline'. Replace '__alignof__' by
'fc_alignof'.
reviewed by: plam
Patrick Lam [Fri, 7 Apr 2006 04:42:32 +0000 (04:42 +0000)]
Patrick Lam <plam@mit.edu>
Make fontconfig compile under MinGW:
1) remove unneeded #includes;
2) make use of mmap and sysconf conditional;
3) replace rand_r by srand/rand if needed;
4) use chsize instead of ftruncate; and
5) update libtool exports file
Patrick Lam [Thu, 6 Apr 2006 04:52:21 +0000 (04:52 +0000)]
Reduce amount of dirty rss by const'ing some data structures.
Don't fail if we can't create or remove $(pkgcachedir) i.e.
/var/cache/fontconfig. (reported by Quanah Gibson-Mount).
reviewed by: plam
Patrick Lam [Wed, 8 Mar 2006 20:32:56 +0000 (20:32 +0000)]
debian/po/*
.cvsignore
Remove debian/ directory from sources. See Debian's subversion server at
svn://svn.debian.org/pkg-freedesktop/trunk/fontconfig instead.
Patrick Lam [Wed, 8 Mar 2006 02:30:43 +0000 (02:30 +0000)]
Remove stuff we don't use, make get_{char,short,long} functions of ftglue
macros to be inlined.
Code cleanups (excess prototype, old-style function definition).
reviewed by: plam
Patrick Lam [Thu, 16 Feb 2006 07:12:04 +0000 (07:12 +0000)]
Don't bail if fontconfig can't remove a dir cache file. Skip the ID of a
cache file when copying. Eliminate 'source file too small' bug in
FcDirCacheWrite.
Patrick Lam [Mon, 13 Feb 2006 21:51:11 +0000 (21:51 +0000)]
Skip bitmap fonts which can't even get it together enough to declare a
family name; this appears to reproduce previous fontconfig behaviour.
reviewed by: plam
Patrick Lam [Sat, 11 Feb 2006 05:01:32 +0000 (05:01 +0000)]
Try to open /var/cache/fontconfig/[hashed name] before fonts.cache-2 in a
directory, because /var/cache/fontconfig failures ought to be fixable,
unlike fonts.cache-2 failures, which may leave you screwed.
reviewed by: plam
Patrick Lam [Sat, 11 Feb 2006 04:50:46 +0000 (04:50 +0000)]
Use a tri-state to mark the fonts which didn't get blocked but were just
missing an element, to distinguish them from the fonts that do match
the element.
reviewed by: plam
Patrick Lam [Tue, 7 Feb 2006 22:09:01 +0000 (22:09 +0000)]
Don't reject dirs that can't be normalized (fixes lilypond, and is correct
in the context of application font directories.)
Use normalized directory name exclusively in FcCacheReadDirs.
reviewed by: plam
Patrick Lam [Tue, 7 Feb 2006 20:56:48 +0000 (20:56 +0000)]
src/fccharset.c (FcLangCharSetPopulate, FcCharSetInsertLeaf)
Fix missing FcCacheBankToIndex in FcCharSetInsertLeaf. Declare extern for
static arrays as arrays, not pointers. (Part of the fix for 'fonts
don't have en' issue after Euro patch.)
(I forgot to commit the ChangeLog last time.)
reviewed by: plam
Patrick Lam [Mon, 6 Feb 2006 22:44:02 +0000 (22:44 +0000)]
Skip subdirs when skipping over stale bits of global cache. Introduce state
machine into FcGlobalCacheDir to avoid doing inappropriate operations
on global dir entries, e.g. writing out an out-of-date cache entry.
reviewed by: plam
Patrick Lam [Mon, 30 Jan 2006 04:27:53 +0000 (04:27 +0000)]
Add documentation for FcConfigNormalizeFontDir.
Write directory information to global caches to fix make check (reported by
Ronny V. Vindenes). This changes the global cache format again.
Patrick Lam [Thu, 26 Jan 2006 16:09:12 +0000 (16:09 +0000)]
Stop trampling the directory name when writing out caches. (with Mike
Fabian:) Beef up FcConfigNormalizeFontDir to scan subdirs when
necessary. Don't scan directories that can't be normalized.
Patrick Lam [Wed, 25 Jan 2006 14:52:49 +0000 (14:52 +0000)]
Fix additional memory leaks reported by Ronny V. Vindenes: don't invoke
FcValueSave on hashed static strings in FcPatternAddWithBinding.
Add another st_dev check in FcDirCacheOpen.
Patrick Lam [Wed, 25 Jan 2006 02:54:37 +0000 (02:54 +0000)]
Treat zh-hk fonts differently from zh-tw fonts. This patch may cause
fontconfig to treat A-X fonts differently from A-Y fonts; please mail
the fontconfig list if this causes any problems.
reviewed by: plam
Patrick Lam [Sat, 14 Jan 2006 21:23:03 +0000 (21:23 +0000)]
Compare device numbers as well as inodes. Always normalize directory names
before comparing them.
Allocate extra space for appended '/' in directory name.
reviewed by: plam
Patrick Lam [Tue, 10 Jan 2006 13:15:05 +0000 (13:15 +0000)]
Explicitly add font dirs to config.fontDirs even if they're empty. Set
current config in fc-cache.c. Fix treatment of cache directory as read
from cache file; don't use string equality to determine if we have the
right file, use inode equality.
Patrick Lam [Mon, 9 Jan 2006 13:58:04 +0000 (13:58 +0000)]
Normalize font dirs by using the form, as given in fonts.conf, and recorded
in FcConfig's fontDirs string set, as canonical.
Actually update config.fontDirs as font directories are scanned.