[Fontconfig] fc-cache sometimes looses fonts

Mike FABIAN mfabian at suse.de
Fri Oct 14 22:59:54 EST 2005


with todays CVS snapshot of the fontconfig 2.4 branch:

    mfabian at magellan:~/.fonts$ fc-list : family file | grep -i zenkai
    ./ukai.ttf: AR PL ZenKai Uni
    mfabian at magellan:~/.fonts$
    mfabian at magellan:~/.fonts$ ls -li --time-style=full-iso ukai.ttf
    197011 -rw-r--r--  1 mfabian suse 14296192 2005-10-14 14:47:03.000000000 +0200 ukai.ttf
    mfabian at magellan:~/.fonts$ ls -lid --time-style=full-iso .
    5505413 drwxr-xr-x  3 mfabian suse 4096 2005-10-14 14:51:01.000000000 +0200 ./
    mfabian at magellan:~/.fonts$

Now move the font to a new name and move it back:

    mfabian at magellan:~/.fonts$ mv ukai.ttf ukai-new.ttf
    mfabian at magellan:~/.fonts$ mv ukai-new.ttf ukai.ttf
    mfabian at magellan:~/.fonts$ ls -li --time-style=full-iso ukai.ttf
    197011 -rw-r--r--  1 mfabian suse 14296192 2005-10-14 14:47:03.000000000 +0200 ukai.ttf
    mfabian at magellan:~/.fonts$ ls -lid --time-style=full-iso .
    5505413 drwxr-xr-x  3 mfabian suse 4096 2005-10-14 14:52:52.000000000 +0200 ./
    mfabian at magellan:~/.fonts$

The font still has the same i-node and time stamp and the time-stamp
of the directory is changed (as expected). Now run "fc-cache -v ."
again:

    mfabian at magellan:~/.fonts$ fc-cache -v . 
    fc-cache: ".": caching, 71 fonts, 1 dirs
    fc-cache: "./kde-override": skipping, 0 fonts, 0 dirs
    fc-cache: succeeded
    mfabian at magellan:~/.fonts$

And now the font appears to be gone:

    mfabian at magellan:~/.fonts$ fc-list : family file | grep -i zenkai
    mfabian at magellan:~/.fonts$

With fontconfig 2.3.2, the font was still available at this point!

Run fc-cache once more adding the force option:

    mfabian at magellan:~/.fonts$ fc-cache -v -f . 
    fc-cache: ".": caching, 71 fonts, 1 dirs
    fc-cache: "./kde-override": caching, 0 fonts, 0 dirs
    fc-cache: succeeded
    mfabian at magellan:~/.fonts$ fc-list : family file | grep -i zenkai
    ./ukai.ttf: AR PL ZenKai Uni
    mfabian at magellan:~/.fonts$

Now the font has appeared again.

-- 
Mike FABIAN   <mfabian at suse.de>   http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。




More information about the Fontconfig mailing list