From a scripting language (Python or Ruby, say) on a Debian-based system, I would like to find either one of:
- All the Unicode codepoints that a particular font has glyphs for
- All the fonts that have glyphs for a particular Unicode codepoint
(Obviously either 1 or 2 can be derived form the other, so whatever is easier would be great.) I have done this in the past by running:
fc-list : file charset
... and parsing the output at the end of each line, based on this code from fontconfig but it seems to me that there ought to be a much simpler way of doing this.
(I'm not completely sure this is the right StackExchange site for this question, but I am looking for an answer that can be used programmatically.)