[Fontconfig] Re: Bug in fc-cat with user cache

Mike FABIAN mfabian at suse.de
Thu Jan 5 09:53:47 PST 2006


Mike FABIAN <mfabian at suse.de> さんは書きました:

> Patrick Lam <plam at MIT.EDU> さんは書きました:
>
>> Frederic Crozat wrote:
>>> Hi all, 
>>> 
>>> while testing fontconfig 2.3.93, I found a bug in fc-cat :
>>> 
>>> if you run :
>>> fc-cat ~/.font.cache-2 (you need to have such a file), you will get
>>> incorrect output :
>>
>> I've just committed a patch for this bug (and another issue I found
>> while testing this patch).  Please let me know if it works.  It changes
>> the format of the ~/.fonts.cache-2 file in a minor (but incompatible) way.
>
> It behaves strange for me now:
>
> mfabian at magellan:~$ rm -f  .fonts.cache-2 
> mfabian at magellan:~$ fc-match sans 
> hgjgbbmp.ttc: "HGPGothicB" "Regular"
> mfabian at magellan:~$ ll .fonts.cache-2 
> -rw------- 1 mfabian suse 4927489  1月  5 17:39 .fonts.cache-2
> mfabian at magellan:~$ fc-cat ~/.fonts.cache-2 
> fc-cat: printing global cache contents for dir /home/mfabian/.fonts/kde-override
> mfabian at magellan:~$
>
> Allthough the generated file is quite big, fc-cat lists only
> one line now.
>
> This is on an AMD 64 bit machine:
>
> mfabian at magellan:~$ uname -a
> Linux magellan 2.6.15-rc6-git2-2-default #1 Thu Dec 22 14:15:42 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux
> mfabian at magellan:~$ 

It's even worse then I reported above:

    mfabian at magellan:~$ xfd -fa "Nimbus Sans L"
    mfabian at magellan:~$

works.

    mfabian at magellan:~$ fc-match "Nimbus Sans L"
    n019003l.pfb: "Nimbus Sans L" "Regular"
    mfabian at magellan:~$

works. Now delete all global caches:

    mfabian at magellan:~$ sudo rm  /var/cache/fontconfig/*
    mfabian at magellan:~$

call fc-match again:

    mfabian at magellan:~$ fc-match "Nimbus Sans L"
    n019003l.pfb: "Nimbus Sans L" "Regular"
    mfabian at magellan:~$

.fonts.cache-2 has been created but it is weird:

    mfabian at magellan:~$ fc-cat .fonts.cache-2
    fc-cat: printing global cache contents for dir /home/mfabian/.fonts/kde-override
    mfabian at magellan:~$

and "xfd -fa" crashes now for all fonts:

    mfabian at magellan:~$ xfd -fa "Nimbus Sans L"
    Warning: Cannot convert string "Nimbus Sans L" to type XftFont
    セグメンテーション違反です (core dumped)
    mfabian at magellan:~$

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



More information about the Fontconfig mailing list