Closed jdhao closed 7 years ago
Good tip.
On my systems the results had no line endings. The man fc-list man page has SEE ALSO section where I found the formatter help... FcPatternFormat(3).
https://linux.die.net/man/3/fcpatternformat
Adding a \n
to the formatter does the trick.
fc-list -f "%{family[0]}\n" | sort | uniq
Yes, I missed a \n
in my original comment.
After looking up the fontconfig manual, I find that you can generat a list of available font family in you system by using the following command:
In my CentOS system, it generates the following output:
Then you don't need cut any more.