[Fontconfig] FcFontList() can return NULL - should it? should it be documented?

Alan Coopersmith alan.coopersmith at oracle.com
Thu Aug 25 05:19:29 UTC 2016

While assisting with the investigation of:
     [JDK-8160664] JVM crashed with font manager on Solaris 12
we discovered that if none of the font directories are present on the system
FcFontList() returns NULL, but if at least one is present, even if empty,
then it returns a valid pointer to a list of 0 entries.

This doesn't seem to be documented anywhere that I can find, but you
can see the fc-list utility checks for it all the way back to the
first revision in git.   Is this intentional?  Should it be documented
so other application authors know to check for NULL?

	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc

More information about the Fontconfig mailing list