I am currently implementing font rendering in McCLIM using Freetype, Harfbuzz and Fontconfig. As long as I pick the correct font, I can get text to render very nicely using these libraries.
My main problem right now is how to deal with missing glyphs. If I render something using, say, Source Code Pro, and the text contains a symbol that does not exist in this font (for example a Greek character) I would like to pick a character a different font.
How should this be done? As far as I can tell, there is no way to easily find the fonts that have a given glyph available, and even if I do search all the fonts, how do I pick the most appropriate one?
I have been unable to find any documentation that explains the process how to do this efficiently, and the main source of documentation I've been using, libXft, doesn't implement font substitution.