How to get a list of installed True Type Fonts on Linux using C or C++?

c, c++, fonts, linux, truetype

Solution

I think fontconfig is the right way to do it. Take a look on the wikipedia article or the fontconfig hompage.

Problem

How can my app get a list of the True Type Fonts that are available on Linux. Is there a standard directory where they are stored across different distributions? Or some other standard way to locate them?

Original source