Details

[Home]

Issue of the Implementation # S0606

Brief

The FcDirScan function doesn't add fonts from some font directories

Detailed Description

The description of the function FcDirScan states: "Scans an entire directory and adds all fonts found to set". But scanning the given directory the function FcDirScan adds 0 fonts, while there are 2 fonts in this directory.

Problem location(s) in the standard

Fontconfig Developers Reference, Version 2.4.2

Example

#define FOLDER_PATH  "/home/tester/some_dir"  //the folder path
	FcConfig		*fc;
	FcFontSet 		*set;
	FcStrSet		*dirs;
	FcBlanks		*blanks;

	FcInit ();
	if (!(fc = FcConfigGetCurrent ()))
	{
		printf ("Could not get current config");
	}
	if (!(set = FcFontSetCreate ()))
	{
		printf ("Could not create font sets");
	}
	if (!(dirs = FcStrSetCreate ()))
	{
		printf ("Could not create str set");
	}
	if (!(blanks = FcConfigGetBlanks (fc)))
	{
		printf ("Could not create blanks");
	}	

	FcDirScan (set, dirs, 0, blanks, (FcChar8 *)FOLDER_PATH, FcTrue);

    /*
     * Scans an entire directory and adds all fonts found to set
     *
     * set->nfont should be 2
     */
 

Component

fontconfig 2.2.3 or later

Environment

Distributions

The problem is appeared in the following distributions:

Distribution Architecture Version
RedHat 4 x86_64 fontconfig 2.2.3
Debian 4 ia32 fontconfig 2.4.2
Ubuntu 6.06 ia32 fontconfig 2.3.2
SLES 10 ppc32 fontconfig 2.3.2
RedHat 4 ia32 fontconfig 2.4.1
openSUSE 10.2 x86_64 fontconfig 2.4.2
Ubuntu 7.04 x86_64 fontconfig 2.4.2

Accepted

freedesktop.org Bugzilla 12950

[Home]