[Fontconfig] Re: Finding font filename

Mike FABIAN mfabian at suse.de
Thu Dec 22 18:26:14 PST 2005


Keith Packard <keithp at keithp.com> さんは書きました:

> On Thu, 2005-12-22 at 17:01 +0200, Teus Benschop wrote:
>> Hello,
>> 
>> Given a name, like "Bitstream Charter 16", is there any way to get the
>> path to the actual font file out of that? 
>
> That's the central thing that fontconfig does. Try:
>
> $ fc-match -v 'Charter'-16

With the latest fontconfig 2.4 branch (CVS checkout from today),
this command doesn't list the full path anymore, only the base name:

mfabian at magellan:~$ fc-match -v 'Nimbus Mono L'-16  | grep file
        file: "n022003l.pfb"(s)
mfabian at magellan:~$ fc-list 'Nimbus Mono L' file
/usr/X11R6/lib/X11/fonts/n022024l.pfb:
/usr/X11R6/lib/X11/fonts/n022023l.pfb:
/usr/X11R6/lib/X11/fonts/n022004l.pfb:
/usr/X11R6/lib/X11/fonts/n022003l.pfb:
mfabian at magellan:~$  fc-match -V
fontconfig version 2.3.93
mfabian at magellan:~$ rpm -q fontconfig
fontconfig-2.3.93.20051222-0.1
mfabian at magellan:~$

Older versions of fontconfig listed the full path here:

mike at kibou:~$ fc-match -v 'Nimbus Mono L'-16  | grep file
        file: "/usr/X11R6/lib/X11/fonts/URW/n022003l.pfb"(s)
mike at kibou:~$ fc-list 'Nimbus Mono L' file
/usr/X11R6/lib/X11/fonts/URW/n022003l.pfb:
/usr/X11R6/lib/X11/fonts/URW/n022004l.pfb:
/usr/X11R6/lib/X11/fonts/URW/n022023l.pfb:
/usr/X11R6/lib/X11/fonts/URW/n022024l.pfb:
mike at kibou:~$ fc-match -V
fontconfig version 2.2.99
mike at kibou:~$ rpm -q fontconfig
fontconfig-2.2.99.20050218-8.1
mike at kibou:~$

Was that an intentional change or is this a bug?

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



More information about the Fontconfig mailing list