I am trying to print out the Chinese font I have in my laptop, and sort the output with respect to their name that could be referred to in LaTeX
. This could be done with the following command:
fc-list :lang=zh-cn | awk -F": " '{$1=""; print}' | sort
It finds the font list, then after first occurrence of :
and a single space, which is where the names of the font show up. Then we of course sort it.
The problem here is though, there are fonts named like .PingFang SC
, which is sorted to the very front and is not that consistent with the rest. Is there a way to sort disregarding the period?
It may not be a good choice to remove the period, which will change the actual name of the font and thus make the reference hard.