I would not say it's totally impossible -- but it might come close.
InDesign does not give access to such low-level information, but it does give you the full path & filename of any specific font. I tested it once and was able to read the number of characters of an Opentype font -- but it didn't work under all circumstances, for all fonts. Apparently, there are a few different 'tastes' of OTF.
I dunno where to look for character widths; but to get side bearings, you'd even have to go a step further: these are only defined by virtue of the character outline, so you have to compare the minimum and maximum values as defined for the character paths against its reported total width.
I'm addressing just Opentype here, but there are a number of other "standard" font file formats. If you want a complete solution, you would need to do the same for TTF (Mac old style) and for Type 1 fonts as well.
1 person found this helpful
Incidentally, to-day I re-installed Just van Rossum's excellent TTX again (this time on my Windows 7 machine). I gave it a quick test to see if it works (it does), and (re-)discovered that the items you seek -- standard kerning pairs, widths, and side bearings -- are all written out in clear human readable XML notation.
Didn't spot any Opentype pair kerning classes though, so perhaps that's not supported, or I didn't see them in my cursory inspection, or (also possible) there simply weren't any in the font I tested with.
TTX supports per-table disassembly, so you can have it write out a complete data file once, check which tables contain the info you seek, and next time have it only output those tables.
You can get just ascender and descender values, that's about it. Not even x- and cap-height, though you can script your way around that and find them. As Jongware said, anything else gets very tricky.
Please go to http://www.adobe.com/support/feature.html and ask Adobe to expose more font chracteristics to scripting. The more of us ask, the better the chance we'll get something.