This looks very interesting!
As exercise, you can try to minimic pdffonts in python with pypdf
(pdfs with ttf,otf,type1 etc )
I'm afraid, I don't understand :-(
Under linux, xpdf comes with pdffonts, a cmd line tools that extracts fonts information from a pdf.
You can try to mimic it with pyPdf, so your knowledge can augment .