]> git.wh0rd.org Git - fontconfig.git/log
fontconfig.git
16 years agoFix build with !ENABLE_DOCS and no built manpages.
Eric Anholt [Fri, 18 Apr 2008 18:52:41 +0000 (11:52 -0700)]
Fix build with !ENABLE_DOCS and no built manpages.

16 years agoBump version to 2.5.91 2.5.91
Keith Packard [Thu, 10 Jan 2008 18:58:25 +0000 (10:58 -0800)]
Bump version to 2.5.91

16 years agogit-tag requires space after -m flag
Keith Packard [Thu, 10 Jan 2008 18:58:22 +0000 (10:58 -0800)]
git-tag requires space after -m flag

16 years agonew-version.sh was mis-editing files
Keith Packard [Thu, 10 Jan 2008 18:56:52 +0000 (10:56 -0800)]
new-version.sh was mis-editing files

16 years agoAdd more files to .gitignore
Keith Packard [Thu, 10 Jan 2008 18:48:00 +0000 (10:48 -0800)]
Add more files to .gitignore

16 years agoDistribute khmer font aliases
Keith Packard [Thu, 10 Jan 2008 18:43:33 +0000 (10:43 -0800)]
Distribute khmer font aliases

16 years agoCreate new-version.sh to help with releases, update INSTALL instructions
Keith Packard [Thu, 10 Jan 2008 18:40:41 +0000 (10:40 -0800)]
Create new-version.sh to help with releases, update INSTALL instructions

16 years agoDistribute new fcftint.h file
Keith Packard [Thu, 10 Jan 2008 16:58:57 +0000 (08:58 -0800)]
Distribute new fcftint.h file

16 years agoEliminate references to freetype from utility Makefile.am's
Keith Packard [Tue, 8 Jan 2008 20:34:19 +0000 (12:34 -0800)]
Eliminate references to freetype from utility Makefile.am's

The utility programs don't use any freetype interfaces, so they
don't need to directly refer to freetype headers or libraries.

16 years agoInclude fcftaliastail.h so that the freetype funcs are exported.
Keith Packard [Tue, 8 Jan 2008 00:31:06 +0000 (16:31 -0800)]
Include fcftaliastail.h so that the freetype funcs are exported.

This header file needs to be included at the end of every file that
exports any freetype symbols.

16 years agoRemove freetype requirement for build-time applications.
Keith Packard [Wed, 2 Jan 2008 16:47:14 +0000 (08:47 -0800)]
Remove freetype requirement for build-time applications.

This avoids requiring the freetype development files when cross compiling

16 years agoFix OOM failure case in FcPStackPush.
Keith Packard [Sun, 23 Dec 2007 22:06:41 +0000 (14:06 -0800)]
Fix OOM failure case in FcPStackPush.

When allocation for the node attributes fail, clean up the node allocation
and report failure.

16 years agoNot_contain should use strstr, not strcmp on strings. (bug 13632)
Hongbo Zhao [Thu, 13 Dec 2007 05:47:33 +0000 (21:47 -0800)]
Not_contain should use strstr, not strcmp on strings. (bug 13632)

For Version 2.5.0, (same for previous version 2.4.2), in source file fccfg.c,
on line 700,

Original:
      ret = FcStrCmpIgnoreCase (left.u.s, right.u.s) == 0;

Should change to:
      ret = FcStrStrIgnoreCase (left.u.s, right.u.s) == 0;

I think this is just a mistake when copy-n-paste similar codes in the same
function. Apparently, return for "Not_contain" should be just the inverse of
"Contain", not the same as "Equal".

17 years agoMove conf.avail/README to conf.d/README (bug 13392)
Keith Packard [Mon, 26 Nov 2007 00:35:55 +0000 (16:35 -0800)]
Move conf.avail/README to conf.d/README (bug 13392)

Because conf.d is where most people look first.  And the comment at the top
of the README file says conf.d/README too.

17 years agoBump version number to 2.5 2.5.0
Keith Packard [Wed, 14 Nov 2007 02:56:44 +0000 (18:56 -0800)]
Bump version number to 2.5

17 years agoWorkaround for stat() brokenness in Microsoft's C library (bug 8526)
Tor Lillqvist [Wed, 14 Nov 2007 00:41:55 +0000 (16:41 -0800)]
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.

17 years agoRevert "Remove fcprivate.h, move the remaining macros to fcint.h."
Keith Packard [Tue, 13 Nov 2007 23:48:30 +0000 (15:48 -0800)]
Revert "Remove fcprivate.h, move the remaining macros to fcint.h."

This reverts commit b607922909acfc7ae96de688ed34efd19cd038ac.

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.

17 years agoDocument that FcConfigGetFonts returns the internal fontset (bug 13197)
Keith Packard [Tue, 13 Nov 2007 23:16:58 +0000 (15:16 -0800)]
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.

17 years agoDocument that Match calls FcFontRenderPrepare (bug 13162).
Keith Packard [Tue, 13 Nov 2007 23:11:35 +0000 (15:11 -0800)]
Document that Match calls FcFontRenderPrepare (bug 13162).

The behaviour of FcFontMatch and FcFontSetMatch is hard to understand without
knowing that they call FcFontRenderPrepare.

17 years agoDocument several function return values (Bug 13145).
Keith Packard [Tue, 13 Nov 2007 22:58:39 +0000 (14:58 -0800)]
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.

17 years agoFix parallel build in doc directory. 2.4.92
Keith Packard [Tue, 6 Nov 2007 00:08:55 +0000 (16:08 -0800)]
Fix parallel build in doc directory.

docbook2man has fixed output file names; place output in a subdirectory to
avoid collisions.

17 years agoUpdate version numbers to 2.4.92 (2.5 RC2)
Keith Packard [Mon, 5 Nov 2007 23:52:45 +0000 (15:52 -0800)]
Update version numbers to 2.4.92 (2.5 RC2)

17 years agoSimplify/improve 30-metric-aliases.conf
Behdad Esfahbod [Mon, 5 Nov 2007 23:12:51 +0000 (18:12 -0500)]
Simplify/improve 30-metric-aliases.conf

17 years agoRemove list of available conf files from README.
Behdad Esfahbod [Mon, 5 Nov 2007 22:07:36 +0000 (17:07 -0500)]
Remove list of available conf files from README.
It was redundant and out-dated.

17 years agoFix documented conf-file naming format in README
Behdad Esfahbod [Mon, 5 Nov 2007 22:05:36 +0000 (17:05 -0500)]
Fix documented conf-file naming format in README

17 years agoRemove 25-unhint-nonlatin.conf from default configuration by not linking it.
Behdad Esfahbod [Mon, 5 Nov 2007 22:01:44 +0000 (17:01 -0500)]
Remove 25-unhint-nonlatin.conf from default configuration by not linking it.

17 years agoOops, fix Makefile.am.
Behdad Esfahbod [Mon, 5 Nov 2007 21:46:19 +0000 (16:46 -0500)]
Oops, fix Makefile.am.

17 years agoRemove 20-lohit-gujarati.conf. It's covered by 25-unhint-nonlatin.conf now.
Behdad Esfahbod [Mon, 5 Nov 2007 21:43:49 +0000 (16:43 -0500)]
Remove 20-lohit-gujarati.conf.  It's covered by 25-unhint-nonlatin.conf now.

17 years agoRemove redundant/obsolete comments from conf files.
Behdad Esfahbod [Mon, 5 Nov 2007 21:43:14 +0000 (16:43 -0500)]
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.

17 years agoUse binding="same" in 30-urw-aliases.conf and remove duplicate entries.
Behdad Esfahbod [Mon, 5 Nov 2007 21:40:25 +0000 (16:40 -0500)]
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.

17 years agoSplit 40-generic.conf into 40-nonlatin.conf and 45-latin.conf
Behdad Esfahbod [Mon, 5 Nov 2007 21:36:55 +0000 (16:36 -0500)]
Split 40-generic.conf into 40-nonlatin.conf and 45-latin.conf

17 years agoAdd/update config files from Fedora.
Behdad Esfahbod [Mon, 5 Nov 2007 21:14:35 +0000 (16:14 -0500)]
Add/update config files from Fedora.

17 years agoAdd FcGetLangs() and FcLangGetCharSet().
Behdad Esfahbod [Mon, 5 Nov 2007 20:29:44 +0000 (15:29 -0500)]
Add FcGetLangs() and FcLangGetCharSet().

17 years agoFix trivial bugs in edit-sgml.c
Behdad Esfahbod [Mon, 5 Nov 2007 20:29:03 +0000 (15:29 -0500)]
Fix trivial bugs in edit-sgml.c

17 years agoExport FcConfig{G,S}etRescanInverval from .so, mark as deprecated.
Keith Packard [Sun, 4 Nov 2007 20:20:45 +0000 (12:20 -0800)]
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).

17 years agoIgnore new generated documentation
Keith Packard [Sun, 4 Nov 2007 06:43:48 +0000 (23:43 -0700)]
Ignore new generated documentation

17 years agoLink new function documentation into the fontconfig-devel.sgml
Keith Packard [Sun, 4 Nov 2007 06:42:32 +0000 (23:42 -0700)]
Link new function documentation into the fontconfig-devel.sgml

17 years agoFormatting syntax mistake in doc/fclangset.fncs.
Keith Packard [Sun, 4 Nov 2007 06:41:38 +0000 (23:41 -0700)]
Formatting syntax mistake in doc/fclangset.fncs.

<parameter>ls</function> needed to be <parameter>ls</parameter>.

17 years agoGenerate fccache.sgml, fcdircache.sgml and fclangset.sgml.
Keith Packard [Sun, 4 Nov 2007 06:23:55 +0000 (23:23 -0700)]
Generate fccache.sgml, fcdircache.sgml and fclangset.sgml.

Just adding the .fncs versions doesn't get these files generated.

17 years agoFix formatting syntax in doc/fccache.fncs
Keith Packard [Sun, 4 Nov 2007 06:23:09 +0000 (23:23 -0700)]
Fix formatting syntax in doc/fccache.fncs

17 years agoReplace incorrect documentation uses of 'char' with 'FcChar8' (bug 13002).
Keith Packard [Sun, 4 Nov 2007 06:03:11 +0000 (23:03 -0700)]
Replace incorrect documentation uses of 'char' with 'FcChar8' (bug 13002).

17 years agoRemove references to FcConfigParse and FcConfigLoad.
Keith Packard [Sun, 4 Nov 2007 05:53:12 +0000 (22:53 -0700)]
Remove references to FcConfigParse and FcConfigLoad.

These functions no longer exist.

17 years agoHave FcConfigSetCurrent accept the current configuration and simply return
Keith Packard [Sun, 4 Nov 2007 05:45:31 +0000 (22:45 -0700)]
Have FcConfigSetCurrent accept the current configuration and simply return
without updating anything.

17 years agoUpdate documentation for stale FcConfigGetConfig function.
Keith Packard [Sun, 4 Nov 2007 05:39:54 +0000 (22:39 -0700)]
Update documentation for stale FcConfigGetConfig function.

The old per-user cache filename is no longer used.

17 years agoUpdate documentation for FcStrCopyFilename (bug 12964).
Keith Packard [Sun, 4 Nov 2007 05:31:16 +0000 (22:31 -0700)]
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.

17 years agoDocument previously undocumented functions. (bug 12963)
Keith Packard [Sun, 4 Nov 2007 05:23:28 +0000 (22:23 -0700)]
Document previously undocumented functions. (bug 12963)

17 years agoVerify documentation covers exposed symbols.
Keith Packard [Sun, 4 Nov 2007 05:01:33 +0000 (22:01 -0700)]
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.

17 years agoUse FcLangDifferentTerritory instead of FcLangDifferentCountry.
Keith Packard [Sun, 4 Nov 2007 04:58:34 +0000 (21:58 -0700)]
Use FcLangDifferentTerritory instead of FcLangDifferentCountry.

17 years agoDon't check cache file time stamps when cleaning cache dir.
Keith Packard [Sun, 4 Nov 2007 04:57:51 +0000 (21:57 -0700)]
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.

17 years agoTypo error in function name: Inverval -> interval
Keith Packard [Sun, 4 Nov 2007 04:56:36 +0000 (21:56 -0700)]
Typo error in function name: Inverval -> interval

17 years agoTrack line numbers in sgml edit tool input.
Keith Packard [Sun, 4 Nov 2007 04:55:39 +0000 (21:55 -0700)]
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.

17 years agoClean up exported names in fontconfig.h.
Keith Packard [Sun, 4 Nov 2007 04:54:49 +0000 (21:54 -0700)]
Clean up exported names in fontconfig.h.

Fix typo errors (Inverval indeed).
Remove FcPattern *p from FcValue (unused)
Remove spurious FcPublic from formals.

17 years agoMake file_stat argument to FcDirCacheLoadFile optional.
Keith Packard [Sat, 3 Nov 2007 21:16:29 +0000 (14:16 -0700)]
Make file_stat argument to FcDirCacheLoadFile optional.

Allow file_stat to be NULL by using a local stat structure in that case.

17 years agoDocument skipping of fonts from FcFileScan/FcDirScan.
Keith Packard [Sat, 3 Nov 2007 20:44:59 +0000 (13:44 -0700)]
Document skipping of fonts from FcFileScan/FcDirScan.

FcFileScan and FcDirScan will skip fonts under direction of the
configuration and default fontconfig policy.

17 years agoCorrect documentation for FcConfigUptoDate (bug 12948).
Keith Packard [Sat, 3 Nov 2007 20:26:16 +0000 (13:26 -0700)]
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.

17 years agoRemove fcprivate.h, move the remaining macros to fcint.h.
Keith Packard [Sat, 3 Nov 2007 20:09:01 +0000 (13:09 -0700)]
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.

17 years agoCorrect documentation for FcAtomicLock (Bug 12947).
Keith Packard [Sat, 3 Nov 2007 20:05:25 +0000 (13:05 -0700)]
Correct documentation for FcAtomicLock (Bug 12947).

FcAtomicLock can only be called once from any process.

17 years agoPort fonts-persian.conf to new alias syntax with binding="same"
Behdad Esfahbod [Fri, 26 Oct 2007 06:02:19 +0000 (02:02 -0400)]
Port fonts-persian.conf to new alias syntax with binding="same"

Signed-off-by: Keith Packard <keithp@koto.keithp.com>
17 years agoRespect "binding" attribute in <alias> entries.
Keith Packard [Fri, 26 Oct 2007 05:30:49 +0000 (22:30 -0700)]
Respect "binding" attribute in <alias> entries.

This makes creating "same" aliases for renamed font families far easier.

17 years agoMake fc-match --sort call FcFontRenderPrepare.
Behdad Esfahbod [Fri, 26 Oct 2007 04:35:45 +0000 (21:35 -0700)]
Make fc-match --sort call FcFontRenderPrepare.

This makes the --sort and regular output the same for each font.

17 years agoAlso check configDirs mtimes in FcConfigUptoDate
Keith Packard [Fri, 26 Oct 2007 04:23:36 +0000 (21:23 -0700)]
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.

17 years agoA few fixups for make distcheck 2.4.91
Keith Packard [Thu, 25 Oct 2007 22:19:14 +0000 (15:19 -0700)]
A few fixups for make distcheck

17 years agoSet version numbers to 2.4.91 (2.5 RC1)
Keith Packard [Thu, 25 Oct 2007 22:07:54 +0000 (15:07 -0700)]
Set version numbers to 2.4.91 (2.5 RC1)

17 years agoBuild fix for Solaris 10 with GCC.
Keith Packard [Thu, 25 Oct 2007 21:36:24 +0000 (14:36 -0700)]
Build fix for Solaris 10 with GCC.

Solaris 10 with GCC doesn't appear capable of supporting the symbol
visibility stuff, so disable it.

17 years agoUpdate CaseFolding.txt to Unicode 5.1.0
Behdad Esfahbod [Thu, 25 Oct 2007 21:20:06 +0000 (14:20 -0700)]
Update CaseFolding.txt to Unicode 5.1.0

17 years agoMatch 'ultra' on word boundaries to detect ultra bold fonts. (bug 2511)
Keith Packard [Sat, 2 Sep 2006 03:25:21 +0000 (20:25 -0700)]
Match 'ultra' on word boundaries to detect ultra bold fonts. (bug 2511)

Added FcStrContainsWord to detect strings on word boundaries.

17 years agofontconfig needs configure option to use gnu iconv (bug 4083).
Keith Packard [Thu, 25 Oct 2007 08:51:38 +0000 (01:51 -0700)]
fontconfig needs configure option to use gnu iconv (bug 4083).

Existing Solaris workaround was broken; mis-matching values caused the test
for libiconv to always fail.

17 years agoEnsure weight/slant values present even when style is supplied (bug 9313).
Keith Packard [Thu, 25 Oct 2007 08:35:32 +0000 (01:35 -0700)]
Ensure weight/slant values present even when style is supplied (bug 9313).

If the provided style value doesn't match any available font, fall back to
using the weight and slant values by ensuring that those are in the pattern.

17 years agoDistribute man source files for command line programs (bug 9678).
Keith Packard [Thu, 25 Oct 2007 08:26:09 +0000 (01:26 -0700)]
Distribute man source files for command line programs (bug 9678).

For systems on whch DOCBOOK is unavailable, distribute command line program
manual pages in .man format.

17 years agoAdd/fix *.orth files for South African languages
Dwayne Bailey [Thu, 25 Oct 2007 08:16:06 +0000 (01:16 -0700)]
Add/fix *.orth files for South African languages

This adds the missing orth files for Ndebele (South) (nr), Northern Sotho
(nso), Swati (ss) and Southern Sotho (st).  It also fixes the Tswana (tn)
orth file.

17 years agoFix parallel build in fontconfig/docs (bug 10481).
Keith Packard [Thu, 25 Oct 2007 08:09:11 +0000 (01:09 -0700)]
Fix parallel build in fontconfig/docs (bug 10481).

17 years agoHandle UltraBlack weight.
Keith Packard [Thu, 25 Oct 2007 08:03:40 +0000 (01:03 -0700)]
Handle UltraBlack weight.

UltraBlack is weight 950 on the CSS scale; handle this by name and value
encoding it as fontconfig weight 215.

17 years agoOops. Left debugging printf in previous commit.
Keith Packard [Thu, 25 Oct 2007 08:02:58 +0000 (01:02 -0700)]
Oops. Left debugging printf in previous commit.

17 years agoSpelling errors in documentation. (bug 10879).
Keith Packard [Thu, 25 Oct 2007 07:49:19 +0000 (00:49 -0700)]
Spelling errors in documentation. (bug 10879).

Thanks to David <ssdk@ispras.ru> for spotting these.

17 years agoThere is no U+1257 (bug 10899).
Keith Packard [Thu, 25 Oct 2007 07:46:41 +0000 (00:46 -0700)]
There is no U+1257 (bug 10899).

The Eritrean Tigrinya orthography mistakenly included this unicode value.

17 years agoFcInit should return FcFalse when FcInitLoadConfigAndFonts fails. (bug 10976)
Keith Packard [Thu, 25 Oct 2007 07:41:28 +0000 (00:41 -0700)]
FcInit should return FcFalse when FcInitLoadConfigAndFonts fails. (bug 10976)

Thanks to David <ssdk@ispras.ru> for spotting this error.

17 years agoStore FcVendorFoundries in read-only memory.
Tilman Sauerbeck [Thu, 25 Oct 2007 07:38:44 +0000 (00:38 -0700)]
Store FcVendorFoundries in read-only memory.

Create fixed size strings for vendor and foundry.

17 years agoStore FcNoticeFoundries in read-only memory.
Tilman Sauerbeck [Thu, 25 Oct 2007 07:36:37 +0000 (00:36 -0700)]
Store FcNoticeFoundries in read-only memory.

Use a single character array and a separate table of integer indices.

17 years agoReplace makealias pattern with something supported by POSIX grep (bug 11083)
Keith Packard [Thu, 25 Oct 2007 07:22:04 +0000 (00:22 -0700)]
Replace makealias pattern with something supported by POSIX grep (bug 11083)

The suggested replacement in the bug was not supported by GNU grep, so I
created something that should be supported everywhere (famous last words).

17 years agoAdd BRAILLE PATTERN BLANK to list of blank glyphs.
Keith Packard [Thu, 25 Oct 2007 04:59:33 +0000 (21:59 -0700)]
Add BRAILLE PATTERN BLANK to list of blank glyphs.

Braille pattern blank is often imaged as a blank glyph.

17 years agoMove <cachedir> elements to the end of fonts.conf.
Keith Packard [Thu, 25 Oct 2007 04:52:56 +0000 (21:52 -0700)]
Move <cachedir> elements to the end of fonts.conf.

This allows users to select alternate directories for cache files, ahead of
the 'standard' directories.

17 years agoLeave generated headers out of distribution (bug 12734).
Keith Packard [Thu, 25 Oct 2007 04:47:40 +0000 (21:47 -0700)]
Leave generated headers out of distribution (bug 12734).

If the generated header files are included in the distribution, a build
outside of the source directory will use them. For machine-specific files,
this generates the wrong result (fcarch.h). Leaving them out of the
distribution forces them to be built.

17 years agoEliminate relocations from FcCodePageRange structure (bug 10982).
Keith Packard [Thu, 18 Oct 2007 16:48:31 +0000 (09:48 -0700)]
Eliminate relocations from FcCodePageRange structure (bug 10982).

FcCodePageRange was using char pointers; replace them with char arrays.

17 years agoEliminate relocations for glyph name table.
Keith Packard [Thu, 18 Oct 2007 16:43:22 +0000 (09:43 -0700)]
Eliminate relocations for glyph name table.

Glyph names (now used only for dingbats) were using many relocations,
causing startup latency plus per-process memory usage. Replace pointers with
table indices, shrinking table size and elimninating relocations.

17 years agoMust not insert cache into hash table before completely validating.
Keith Packard [Thu, 18 Oct 2007 16:41:00 +0000 (09:41 -0700)]
Must not insert cache into hash table before completely validating.

The cache was inserted into the hash table before the timestamps in the
cache were verified; if that verification failed, an extra pointer to the
now freed cache would be left in the hash table. FcFini would fail an
assertion as a result.

17 years agoPlace language name in constant array instead of pointer.
Keith Packard [Thu, 18 Oct 2007 15:58:14 +0000 (08:58 -0700)]
Place language name in constant array instead of pointer.

Constant char array of 8 bytes is the same size as a pointer plus a short
string, so this actually saves memory and eliminates a pile of relocations.

17 years agoFcConfigParseAndLoad doc was missing the last param.
Keith Packard [Thu, 18 Oct 2007 15:56:42 +0000 (08:56 -0700)]
FcConfigParseAndLoad doc was missing the last param.

Typo lost the last param to this function.

17 years agoAvoid crashes if config files contain junk.
Mike FABIAN [Thu, 18 Oct 2007 12:44:28 +0000 (05:44 -0700)]
Avoid crashes if config files contain junk.

If ~/.fonts.conf contains:

  <edit mode="assign_replace" name="spacing">
     <int>mono</int>
       </edit>

fontconfig crashes:

    mfabian@magellan:~$ fc-match sans
        Fontconfig error: "~/.fonts.conf", line 46: "mono": not a valid
integer
    セグメンテーション違反です (core dumped)
        mfabian@magellan:~$

Of course the above is nonsense, “mono” is no valid integer indeed.

But I think nevertheless fontconfig should not crash in that case.

The problem was caused by partially truncated expression trees caused by
parse errors -- typechecking these walked the tree without verifying the
integrity of the structure. Of course, the whole tree will be discarded
shortly after being loaded as it contained an error.

17 years agoHandle Japanese fonts better. (debian bug #435971)
Hideki Yamane [Thu, 18 Oct 2007 12:17:36 +0000 (05:17 -0700)]
Handle Japanese fonts better. (debian bug #435971)

Add some commonly available Japanese fonts to the standard aliases.

17 years agoHave fc-cache remove invalid cache files from cache directories.
Keith Packard [Thu, 18 Oct 2007 12:05:59 +0000 (05:05 -0700)]
Have fc-cache remove invalid cache files from cache directories.

Old cache file versions, or corrupted cache files should be removed when
cleaning cache directories with fc-cache. This only affects filenames which
match the fontconfig cache file format, so other files will be left alone.

17 years agoDon't use X_OK bit when checking for writable directories (bug 12438)
Keith Packard [Thu, 18 Oct 2007 12:04:39 +0000 (05:04 -0700)]
Don't use X_OK bit when checking for writable directories (bug 12438)

Some mingw versions have broken X_OK checking; instead of trying to work
around this in a system-depedent manner, simply don't bother checking for
X_OK along with W_OK as such cases are expected to be mistakes, and not
sensible access control.

17 years agoVerbose message about cleaning directories was imprecise
Keith Packard [Thu, 18 Oct 2007 12:01:41 +0000 (05:01 -0700)]
Verbose message about cleaning directories was imprecise

Non-existent directories are now described as 'non-existent' instead of
'unwritable'.

17 years agoImprove verbose messages from fc-cache.
Keith Packard [Thu, 18 Oct 2007 11:58:31 +0000 (04:58 -0700)]
Improve verbose messages from fc-cache.

fc-cache would say 'skipping: %d fonts, %d dirs' or 'caching: %d fonts, %d
dirs', which could easily mislead the user. Add 'existing cache is valid' or
'new cache contents' to these messages to explain what it is doing.

17 years agoRemove unneeded call to access(2) in fc-cache.
Keith Packard [Thu, 18 Oct 2007 11:54:51 +0000 (04:54 -0700)]
Remove unneeded call to access(2) in fc-cache.

This call was followed by a call to stat(2) which provided the necessary
information. This call to access(2) was necessary when cache files were
stored in the font directory as that would check for write permission
correctly.

17 years agoMake FC_FULLNAME include all fullname entries, elide nothing. [bug 12827]
Keith Packard [Thu, 18 Oct 2007 11:31:33 +0000 (04:31 -0700)]
Make FC_FULLNAME include all fullname entries, elide nothing. [bug 12827]

The old policy of eliding fullname entries which matched FC_FAMILY or
FC_FAMILY + FC_STYLE meant that applications could not know what the
font foundry set as the fullname of the font. Hiding information is not
helpful.

17 years agoComment about mmaping cache files was misleading.
Keith Packard [Thu, 18 Oct 2007 11:29:13 +0000 (04:29 -0700)]
Comment about mmaping cache files was misleading.

17 years agoStore font directory mtime in cache file.
Keith Packard [Thu, 18 Oct 2007 11:13:51 +0000 (04:13 -0700)]
Store font directory mtime in cache file.

Instead of relying on mtime ordering between a directory and its associated
cache file, write the directory mtime into the cache file itself. This makes
cache file checks more reliable across file systems.

This change is made in a way that old programs can use new cache files, but
new programs will need new cache files.

17 years agoFix ChangeLog generation to avoid circular make dependency
Keith Packard [Thu, 18 Oct 2007 10:52:29 +0000 (03:52 -0700)]
Fix ChangeLog generation to avoid circular make dependency

17 years agoFree temporary string in FcDirCacheUnlink (Bug #11758)
Keith Packard [Sun, 5 Aug 2007 19:31:03 +0000 (12:31 -0700)]
Free temporary string in FcDirCacheUnlink (Bug #11758)

In FcDirCacheUnlink(), the line

  cache_hashed = FcStrPlus (cache_dir, cache_base);

allocates memory in cache_hashed that is never free()'d before the function
exits.

Reported by Ben Combee.

17 years agoWork around FreeType bug when glyph name buffer is too small.
Keith Packard [Mon, 12 Mar 2007 17:32:23 +0000 (10:32 -0700)]
Work around FreeType bug when glyph name buffer is too small.

Recent versions of FreeType do not correctly deal with glyph name buffers
that are too small; work around this by declaring a buffer that can hold any
PS name (127 bytes).