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.
These two names are typos of the correct names. Instead of simply changing
them, the correct thing to do is leave them in the library, add the correct
functions and mark them as deprecated so any source packages will be updated.
This requires bumping the minor version of the library (for adding APIs)
instead of bumping the major version of the library (for removing APIs).
Instead of attempting to track exported symbols manually in
fontconfig.def.in, build it directly from the public fontconfig header files
to ensure it exports the public API.
Borrowing header stuff written for cairo, fontconfig now exposes in the
shared library only the symbols which are included in the public header
files. All private symbols are hidden using suitable compiler directives.
A few new public functions were required for the fontconfig utility programs
(fc-cat and fc-cache) so those were added, bumping the .so minor version number
in the process.
Map existing architecture signature to short architecture name
at build time. This architecture name is (as yet) unused, but will be used
to build per-architecture cache files with names made unique by including
the architecture name. The auto-detected architecture name can be overridden
with the --with-arch=ARCH configure option.
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
Use open instead of fopen (requested by Phil Race for Sun).
src/fccache.c (FcDirCacheWrite);
Fix GCC4 warning and Makefile brokenness for /var/cache/fontconfig dir.
helps make fontconfig FHS-compliant, but requires that all caches get
rebuilt.
Also, autogen.sh now needs the additional parameter
--localstatedir=/var.
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.
configuration files. Deprecate use of local.conf for local
customizations in favor of this directory based scheme which is more
easily integrated into installation systems.
Tag FC_EMBOLDEN as a boolean variable
Add new helper program 'fc-case' to construct case folding tables from
standard Unicode CaseFolding.txt file
Re-implement case insensitive functions with Unicode aware versions
(including full case folding mappings)
wherever the X fonts are located).
Document new <include>directory-name</include> semantics
add <include ignore_missing="yes">conf.d</include>
Add selectfont to ignore bitmap fonts, add comment for selectfont which
accepts bitmap fonts.
Allow <include> configuration elements to reference directories. Parse and
load all files of the form [0-9]* in sorted order.
Add detection of iconv
Document new selectfont elements
Switch to UTF-8 in comment
Add fullname, and family/style/fullname language entries
Respect selectfont/*/glob
Add support for selectfont
Add multi-lingual family/style/fullname support
Expose FcListPatternMatchAny (which selectfont/*/pattern uses)
Add new FcPatternRemove/FcPatternAppend. FcObjectStaticName stores computed
pattern element names which are required to be static.
clean up .spec file; perhaps this will be useful to somebody...
Update to 2.2.93
Make 'scanopen' static so GCC doesn't whine about lacking prototype
Add WARN_CFLAGS to pass -W flags for GCC systems
Change various char types around to match across function calls. Fixed bug
in using available_sizes[i].height which is in pixels, not 64ths of a
pixel.