Package: libfontconfig1 Version: 2.3.2-1 Followup-For: Bug #314720
FWIW, the following minimal program can be used to time the fontconfig startup: ---------------cut here------------------ #include <stdio.h> #include <fontconfig/fontconfig.h> int main() { int err = FcInit(); if(err == FcFalse){ printf("Couldn't initialize fontconfig lib\n"); exit(err); } return 0; } ---------------cut here------------------ 10-30 seconds was a bit optimistic, with cold caches it's even taking quite a bit longer (~2 minutes). I also forgot to tag it as upstream, as this is certainly not debian-specific. :-) The following patch fixes the problem for me by prefixing the hostname: ---------------cut here------------------ --- fontconfig-2.3.2/src/fccfg.c 2005-03-09 05:56:35.000000000 +0100 +++ fontconfig-2.3.2.patched/src/fccfg.c 2005-06-18 02:24:05.000000000 +0200 @@ -77,8 +77,24 @@ config->cache = 0; if (FcConfigHome()) - if (!FcConfigSetCache (config, (FcChar8 *) ("~/" FC_USER_CACHE_FILE))) + { + int templen = 200; + FcChar8 *hostname = calloc(1, templen); + FcChar8 *temp; + FcChar8 *cachefile; + + gethostname(hostname, templen); + temp = FcStrPlus("~/.", hostname); + cachefile = FcStrPlus(temp, FC_USER_CACHE_FILE); + FcStrFree(temp); + free(hostname); + + if (!FcConfigSetCache (config, cachefile)) + { + FcStrFree(cachefile); goto bail8; + } + } #ifdef _WIN32 if (config->cache == 0) ---------------cut here------------------ -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (990, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.11.12-ac7-vs1.9.5-htbatm-imq Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages libfontconfig1 depends on: ii fontconfig 2.3.2-1 generic font configuration library ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an ii libexpat1 1.95.8-3 XML parsing C library - runtime li ii libfreetype6 2.1.7-2.4 FreeType 2 font engine, shared lib ii zlib1g 1:1.2.2-4 compression library - runtime -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]