Commit Graph

1039 Commits

Author SHA1 Message Date
Tor Lillqvist 8a3dc4880c Workaround for stat() brokenness in Microsoft's C library (bug 8526)
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.
2007-11-13 16:41:55 -08:00
Keith Packard 1315db01b6 Revert "Remove fcprivate.h, move the remaining macros to fcint.h."
This reverts commit b607922909.

Conflicts:

	src/Makefile.am

Xft still uses the macros that are in fcprivate.h. Document those macros and
include fcprivate.h in the published header files.
2007-11-13 15:48:30 -08:00
Keith Packard eaf4470a46 Document that FcConfigGetFonts returns the internal fontset (bug 13197)
FcConfigGetFonts returns the internal font set used by the library which
must not be freed by the application or 'bad things' will happen.
2007-11-13 15:16:58 -08:00
Keith Packard 3fb38716ae Document that Match calls FcFontRenderPrepare (bug 13162).
The behaviour of FcFontMatch and FcFontSetMatch is hard to understand without
knowing that they call FcFontRenderPrepare.
2007-11-13 15:11:35 -08:00
Keith Packard fab44f3cb6 Document several function return values (Bug 13145).
Several functions had no indication of what the return value would be,
mostly these were allocation failure returns.
2007-11-13 14:58:39 -08:00
Keith Packard ed7955a58f Fix parallel build in doc directory.
docbook2man has fixed output file names; place output in a subdirectory to
avoid collisions.
2007-11-05 16:08:55 -08:00
Keith Packard 37e9d33950 Update version numbers to 2.4.92 (2.5 RC2) 2007-11-05 15:52:45 -08:00
Behdad Esfahbod a504f6b539 Simplify/improve 30-metric-aliases.conf 2007-11-05 18:12:51 -05:00
Behdad Esfahbod cbff442c69 Remove list of available conf files from README.
It was redundant and out-dated.
2007-11-05 17:07:36 -05:00
Behdad Esfahbod 0294bda480 Fix documented conf-file naming format in README 2007-11-05 17:05:36 -05:00
Behdad Esfahbod 07d04da76c Remove 25-unhint-nonlatin.conf from default configuration by not linking it. 2007-11-05 17:01:44 -05:00
Behdad Esfahbod 9bac30859b Oops, fix Makefile.am. 2007-11-05 16:47:05 -05:00
Behdad Esfahbod 93b4049c9a Remove 20-lohit-gujarati.conf. It's covered by 25-unhint-nonlatin.conf now. 2007-11-05 16:44:43 -05:00
Behdad Esfahbod 7465091fa9 Remove redundant/obsolete comments from conf files.
Conf files had an initial comment mentioning the files' name.
This was outdated and wrong in most cases.  There's no real use in that.
2007-11-05 16:43:14 -05:00
Behdad Esfahbod 531a143858 Use binding="same" in 30-urw-aliases.conf and remove duplicate entries.
Times, Helvetical, and Courier are already handled in 30-metric-aliases.conf.
Remove them here and add a comment instead.
2007-11-05 16:40:25 -05:00
Behdad Esfahbod 4b51f173c9 Split 40-generic.conf into 40-nonlatin.conf and 45-latin.conf 2007-11-05 16:37:11 -05:00
Behdad Esfahbod 39968fb223 Add/update config files from Fedora. 2007-11-05 16:14:35 -05:00
Behdad Esfahbod cf223cc7bc Add FcGetLangs() and FcLangGetCharSet(). 2007-11-05 15:29:44 -05:00
Behdad Esfahbod 811995b79d Fix trivial bugs in edit-sgml.c 2007-11-05 15:29:03 -05:00
Keith Packard de1faa42d1 Export FcConfig{G,S}etRescanInverval from .so, mark as deprecated.
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).
2007-11-04 12:20:45 -08:00
Keith Packard 69d3eb9cb8 Ignore new generated documentation 2007-11-03 23:43:48 -07:00
Keith Packard dc7b6f1d79 Link new function documentation into the fontconfig-devel.sgml 2007-11-03 23:42:32 -07:00
Keith Packard dac27f2f1a Formatting syntax mistake in doc/fclangset.fncs.
<parameter>ls</function> needed to be <parameter>ls</parameter>.
2007-11-03 23:41:38 -07:00
Keith Packard 9bfb41ffef Generate fccache.sgml, fcdircache.sgml and fclangset.sgml.
Just adding the .fncs versions doesn't get these files generated.
2007-11-03 23:23:55 -07:00
Keith Packard bfdc0047c6 Fix formatting syntax in doc/fccache.fncs 2007-11-03 23:23:09 -07:00
Keith Packard f2772d6b45 Replace incorrect documentation uses of 'char' with 'FcChar8' (bug 13002). 2007-11-03 23:03:11 -07:00
Keith Packard b4a3e83412 Remove references to FcConfigParse and FcConfigLoad.
These functions no longer exist.
2007-11-03 22:53:12 -07:00
Keith Packard fc141b492b Have FcConfigSetCurrent accept the current configuration and simply return
without updating anything.
2007-11-03 22:45:31 -07:00
Keith Packard 7c6939793b Update documentation for stale FcConfigGetConfig function.
The old per-user cache filename is no longer used.
2007-11-03 22:39:54 -07:00
Keith Packard 026fe895e4 Update documentation for FcStrCopyFilename (bug 12964).
FcStrCopyFilename constructs a canonical path for any argument, including
expanding leading ~ and editing '.' and '..' elements out of the resulting
path.
2007-11-03 22:31:16 -07:00
Keith Packard a190678e3c Document previously undocumented functions. (bug 12963) 2007-11-03 22:23:28 -07:00
Keith Packard 9a54f8a194 Verify documentation covers exposed symbols.
Add check-missing-doc script to make sure the documentation matches the
complete list of symbols exported from the header files before release.
2007-11-03 22:01:33 -07:00
Keith Packard c833409f6b Use FcLangDifferentTerritory instead of FcLangDifferentCountry. 2007-11-03 21:58:34 -07:00
Keith Packard 9b84ecff92 Don't check cache file time stamps when cleaning cache dir.
Cache file mtime is meaningless now that the directory time is encoded in
the cache.
2007-11-03 21:57:51 -07:00
Keith Packard 1d93c1752f Typo error in function name: Inverval -> interval 2007-11-03 21:56:36 -07:00
Keith Packard b868a14473 Track line numbers in sgml edit tool input.
Errors in the documentation can be hard to find unless the tool outputs the
line number where the problem exists.
2007-11-03 21:55:39 -07:00
Keith Packard 088b582a26 Clean up exported names in fontconfig.h.
Fix typo errors (Inverval indeed).
Remove FcPattern *p from FcValue (unused)
Remove spurious FcPublic from formals.
2007-11-03 21:54:49 -07:00
Keith Packard e37d10fa74 Make file_stat argument to FcDirCacheLoadFile optional.
Allow file_stat to be NULL by using a local stat structure in that case.
2007-11-03 14:16:29 -07:00
Keith Packard 2ddce88cde Document skipping of fonts from FcFileScan/FcDirScan.
FcFileScan and FcDirScan will skip fonts under direction of the
configuration and default fontconfig policy.
2007-11-03 13:44:59 -07:00
Keith Packard 5d82c4c85d Correct documentation for FcConfigUptoDate (bug 12948).
FcConfigUptoDate only checks whether files have been modified since the
configuration was created. Any changes to the configuration through the API
since then are not considered.
2007-11-03 13:26:16 -07:00
Keith Packard b607922909 Remove fcprivate.h, move the remaining macros to fcint.h.
fcprivate.h was supposed to extend the fontconfig API for the various
fontconfig utilities. Instead, just have those utilities use the internal
fcint.h header file (which they already do), removing fcprivate.h from the
installation and hence from the defacto public API.
2007-11-03 13:09:01 -07:00
Keith Packard 910db318ae Correct documentation for FcAtomicLock (Bug 12947).
FcAtomicLock can only be called once from any process.
2007-11-03 13:05:25 -07:00
Behdad Esfahbod d0e2a0f3a3 Port fonts-persian.conf to new alias syntax with binding="same"
Signed-off-by: Keith Packard <keithp@koto.keithp.com>
2007-10-26 09:56:33 -07:00
Keith Packard 681bb379de Respect "binding" attribute in <alias> entries.
This makes creating "same" aliases for renamed font families far easier.
2007-10-25 22:30:49 -07:00
Behdad Esfahbod 0602c605af Make fc-match --sort call FcFontRenderPrepare.
This makes the --sort and regular output the same for each font.
2007-10-25 21:35:45 -07:00
Keith Packard ad27687f72 Also check configDirs mtimes in FcConfigUptoDate
Checking only config files and font directories can miss changes which
affect only a configuration directory. Check those to catch any changes.
2007-10-25 21:23:36 -07:00
Keith Packard 89d6119c02 A few fixups for make distcheck 2007-10-25 15:19:14 -07:00
Keith Packard e66c65fd41 Set version numbers to 2.4.91 (2.5 RC1) 2007-10-25 15:07:54 -07:00
Keith Packard 7a1a7c0c15 Build fix for Solaris 10 with GCC.
Solaris 10 with GCC doesn't appear capable of supporting the symbol
visibility stuff, so disable it.
2007-10-25 14:36:24 -07:00
Behdad Esfahbod fc990b2e86 Update CaseFolding.txt to Unicode 5.1.0 2007-10-25 14:20:06 -07:00